jquery testrunner: reset $.ajaxSettings after each run to prevent sideeffects between tests
This commit is contained in:
parent
ba48be3ada
commit
1753ab3d82
1 changed files with 2 additions and 0 deletions
|
@ -81,6 +81,7 @@ function runTest() {
|
||||||
_config.blocking = false;
|
_config.blocking = false;
|
||||||
var time = new Date();
|
var time = new Date();
|
||||||
_config.fixture = document.getElementById('main').innerHTML;
|
_config.fixture = document.getElementById('main').innerHTML;
|
||||||
|
_config.ajaxSettings = $.ajaxSettings;
|
||||||
synchronize(function() {
|
synchronize(function() {
|
||||||
time = new Date() - time;
|
time = new Date() - time;
|
||||||
$("<div>").html(['<p class="result">Tests completed in ',
|
$("<div>").html(['<p class="result">Tests completed in ',
|
||||||
|
@ -185,6 +186,7 @@ function expect(asserts) {
|
||||||
function reset() {
|
function reset() {
|
||||||
$("#main").html( _config.fixture );
|
$("#main").html( _config.fixture );
|
||||||
$.event.global = {};
|
$.event.global = {};
|
||||||
|
$.ajaxSettings = $.extend({}, _config.ajaxSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue