Permalink
Browse files

jquery testrunner: reset $.ajaxSettings after each run to prevent sid…

…eeffects between tests
  • Loading branch information...
1 parent ba48be3 commit 1753ab3d823320da79cccc4041f662f2cfd1e20d @jzaefferer jzaefferer committed May 6, 2008
Showing with 2 additions and 0 deletions.
  1. +2 −0 test/data/testrunner.js
View
@@ -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);
}
/**

0 comments on commit 1753ab3

Please sign in to comment.