aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-08-30 15:20:36 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-08-30 15:20:36 +0200
commit7852583980decd716f6c2ed37b1e1d7705332989 (patch)
tree13c1cbf038e2d13a032f0f252a2047ac7de37d6e
parent0164db1e0db342d54f635d7a5fea78ca3b6a518c (diff)
downloadjquery-ui-7852583980decd716f6c2ed37b1e1d7705332989.tar.gz
jquery-ui-7852583980decd716f6c2ed37b1e1d7705332989.zip
Restore QUnit's now dead feature of using jQuery to reset the fixture. Fixes tooltip unit tests
-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;