diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2014-04-05 18:23:03 +0400 |
---|---|---|
committer | Oleg Gaidarenko <markelog@gmail.com> | 2014-04-15 17:46:00 +0400 |
commit | 1dedd3185ea1e9853a2ce26ef3051c63201b4533 (patch) | |
tree | d2ae46dc0324f28a6e4c5d734d4efdd50425217e | |
parent | 4f14bea2c29fb9c1e1cf48da7f700c963e35f693 (diff) | |
download | jquery-1dedd3185ea1e9853a2ce26ef3051c63201b4533.tar.gz jquery-1dedd3185ea1e9853a2ce26ef3051c63201b4533.zip |
Tests: Bring back some of the clean-up logic
-rw-r--r-- | test/data/testrunner.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/data/testrunner.js b/test/data/testrunner.js index 8ef57f777..3d8860975 100644 --- a/test/data/testrunner.js +++ b/test/data/testrunner.js @@ -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 ) { |