mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Restore QUnit's now dead feature of using jQuery to reset the fixture. Fixes tooltip unit tests
This commit is contained in:
parent
0164db1e0d
commit
7852583980
@ -1,5 +1,7 @@
|
|||||||
(function( $ ) {
|
(function( $ ) {
|
||||||
|
|
||||||
|
var reset, jshintLoaded;
|
||||||
|
|
||||||
window.TestHelpers = {};
|
window.TestHelpers = {};
|
||||||
|
|
||||||
function includeStyle( url ) {
|
function includeStyle( url ) {
|
||||||
@ -10,6 +12,15 @@ function includeScript( url ) {
|
|||||||
document.write( "<script src='../../../" + url + "'></script>" );
|
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.requireExpects = true;
|
||||||
|
|
||||||
QUnit.config.urlConfig.push({
|
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"
|
tooltip: "Skip running JSHint, e.g. within TestSwarm, where Jenkins runs it already"
|
||||||
});
|
});
|
||||||
|
|
||||||
var jshintLoaded = false;
|
jshintLoaded = false;
|
||||||
TestHelpers.testJshint = function( module ) {
|
TestHelpers.testJshint = function( module ) {
|
||||||
if ( QUnit.urlParams.nojshint ) {
|
if ( QUnit.urlParams.nojshint ) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user