Skip to content

Commit

Permalink
jquery testrunner: reset $.ajaxSettings after each run to prevent sid…
Browse files Browse the repository at this point in the history
…eeffects between tests
  • Loading branch information
jzaefferer committed May 6, 2008
1 parent ba48be3 commit 1753ab3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/data/testrunner.js
Expand Up @@ -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 ',
Expand Down Expand Up @@ -185,6 +186,7 @@ function expect(asserts) {
function reset() {
$("#main").html( _config.fixture );
$.event.global = {};
$.ajaxSettings = $.extend({}, _config.ajaxSettings);
}

/**
Expand Down

0 comments on commit 1753ab3

Please sign in to comment.