Skip to content

Commit

Permalink
Tests: Bring back some of the clean-up logic
Browse files Browse the repository at this point in the history
  • Loading branch information
markelog committed Apr 15, 2014
1 parent 4f14bea commit 1dedd31
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/data/testrunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 1dedd31

Please sign in to comment.