aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/testsuite.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js
index 4c6898fb3..06890d8d9 100644
--- a/tests/unit/testsuite.js
+++ b/tests/unit/testsuite.js
@@ -1,5 +1,7 @@
(function( $ ) {
+var reset, jshintLoaded;
+
window.TestHelpers = {};
function includeStyle( url ) {
@@ -10,6 +12,15 @@ function includeScript( url ) {
document.write( "<script src='../../../" + url + "'></script>" );
}
+reset = QUnit.reset;
+QUnit.reset = function() {
+ // Ensure jQuery events and data on the fixture are properly removed
+ jQuery("#qunit-fixture").empty();
+ // Let QUnit reset the fixture
+ reset.apply( this, arguments );
+};
+
+
QUnit.config.requireExpects = true;
QUnit.config.urlConfig.push({
@@ -38,7 +49,7 @@ QUnit.config.urlConfig.push({
tooltip: "Skip running JSHint, e.g. within TestSwarm, where Jenkins runs it already"
});
-var jshintLoaded = false;
+jshintLoaded = false;
TestHelpers.testJshint = function( module ) {
if ( QUnit.urlParams.nojshint ) {
return;