mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
jquery testrunner: reset $.ajaxSettings after each run to prevent sideeffects between tests
This commit is contained in:
parent
ba48be3ada
commit
1753ab3d82
@ -81,6 +81,7 @@ function runTest() {
|
||||
_config.blocking = false;
|
||||
var time = new Date();
|
||||
_config.fixture = document.getElementById('main').innerHTML;
|
||||
_config.ajaxSettings = $.ajaxSettings;
|
||||
synchronize(function() {
|
||||
time = new Date() - time;
|
||||
$("<div>").html(['<p class="result">Tests completed in ',
|
||||
@ -185,6 +186,7 @@ function expect(asserts) {
|
||||
function reset() {
|
||||
$("#main").html( _config.fixture );
|
||||
$.event.global = {};
|
||||
$.ajaxSettings = $.extend({}, _config.ajaxSettings);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user