From 1dedd3185ea1e9853a2ce26ef3051c63201b4533 Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Sat, 5 Apr 2014 18:23:03 +0400 Subject: [PATCH] Tests: Bring back some of the clean-up logic --- test/data/testrunner.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 ) { -- 2.39.5