]> source.dussan.org Git - jquery.git/commitdiff
Don't expect QUnit to clean up jQuery internal data. Close gh-883.
authorDave Methvin <dave.methvin@gmail.com>
Mon, 20 Aug 2012 01:09:13 +0000 (21:09 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Mon, 20 Aug 2012 01:09:13 +0000 (21:09 -0400)
test/data/testrunner.js

index cceacfc12b7e43ab8b949010ab3d6118725573ed..70bbc88c3a0ccfb109e58a1b09d4ceb192f7e458 100644 (file)
@@ -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 );
        };
 })();