]> source.dussan.org Git - jquery.git/commitdiff
jquery testrunner: reset $.ajaxSettings after each run to prevent sideeffects between...
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Tue, 6 May 2008 19:39:58 +0000 (19:39 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Tue, 6 May 2008 19:39:58 +0000 (19:39 +0000)
test/data/testrunner.js

index bdb938c40781f6ac208efc9bf3f4ea29f6eeb057..0113ae5c85d074f4544730723afa49457dc9f98e 100644 (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);
 }
 
 /**