]> source.dussan.org Git - jquery.git/commitdiff
Tests: Bring back some of the clean-up logic
authorOleg Gaidarenko <markelog@gmail.com>
Sat, 5 Apr 2014 14:23:03 +0000 (18:23 +0400)
committerOleg Gaidarenko <markelog@gmail.com>
Tue, 15 Apr 2014 13:46:00 +0000 (17:46 +0400)
test/data/testrunner.js

index 8ef57f777928ebce167ec6c4fbebc78d0dff0eab..3d8860975dc7312e80c1b77a0b3ed0120071d404 100644 (file)
@@ -138,8 +138,19 @@ window.moduleTeardown = function() {
        }
 };
 
+QUnit.done(function() {
+       // Remove our own fixtures outside #qunit-fixture
+       supportjQuery( "#qunit ~ *" ).remove();
+});
+
 QUnit.testDone(function() {
 
+       // Ensure jQuery events and data on the fixture are properly removed
+       jQuery( "#qunit-fixture" ).empty();
+       // ...even if the jQuery under test has a broken .empty()
+       supportjQuery( "#qunit-fixture" ).empty();
+
+
        // Reset internal jQuery state
        jQuery.event.global = {};
        if ( ajaxSettings ) {