Commit 1dedd318 authored by Oleg Gaidarenko's avatar Oleg Gaidarenko

Tests: Bring back some of the clean-up logic

parent 4f14bea2
......@@ -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 ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment