From: Dave Methvin Date: Mon, 20 Aug 2012 01:09:13 +0000 (-0400) Subject: Don't expect QUnit to clean up jQuery internal data. Close gh-883. X-Git-Tag: 1.8.1~44 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2b2ca8baa3e220f086f3a5d99c1bb84b5d5bd7c5;p=jquery.git Don't expect QUnit to clean up jQuery internal data. Close gh-883. --- diff --git a/test/data/testrunner.js b/test/data/testrunner.js index cceacfc12..70bbc88c3 100644 --- a/test/data/testrunner.js +++ b/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 ); }; })();