jquery testrunner: reset $.ajaxSettings after each run to prevent sideeffects between tests

This commit is contained in:
Jörn Zaefferer 2008-05-06 19:39:58 +00:00
parent ba48be3ada
commit 1753ab3d82

View File

@ -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);
}
/**