Skip to content
Permalink
Browse files

Don't expect QUnit to clean up jQuery internal data. Close gh-883.

  • Loading branch information...
dmethvin committed Aug 20, 2012
1 parent 488e502 commit 2b2ca8baa3e220f086f3a5d99c1bb84b5d5bd7c5
Showing with 9 additions and 2 deletions.
  1. +9 −2 test/data/testrunner.js
@@ -136,9 +136,16 @@ function testSubproject( label, url, risTests ) {
ajaxSettings = jQuery.ajaxSettings;

QUnit.reset = function() {
reset.apply(this, arguments);

// Ensure jQuery events and data on the fixture are properly removed
jQuery("#qunit-fixture").empty();

// Reset internal jQuery state
jQuery.event.global = {};
jQuery.ajaxSettings = jQuery.extend({}, ajaxSettings);
jQuery.ajaxSettings = jQuery.extend( {}, ajaxSettings );

// Let QUnit reset the fixture
reset.apply( this, arguments );
};
})();

0 comments on commit 2b2ca8b

Please sign in to comment.
You can’t perform that action at this time.