Skip to content
Permalink
Browse files

Restore QUnit's now dead feature of using jQuery to reset the fixture…

…. Fixes tooltip unit tests
  • Loading branch information
jzaefferer committed Aug 30, 2012
1 parent 0164db1 commit 7852583980decd716f6c2ed37b1e1d7705332989
Showing with 12 additions and 1 deletion.
  1. +12 −1 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;

0 comments on commit 7852583

Please sign in to comment.
You can’t perform that action at this time.