mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tests: Load jQuery Migrate before UI test files
This is necessary to catch all possible warnings that the test files may trigger. Closes gh-1918
This commit is contained in:
parent
7caf8f61df
commit
b36d542569
15
tests/lib/bootstrap.js
vendored
15
tests/lib/bootstrap.js
vendored
@ -60,21 +60,24 @@ function requireModules( dependencies, callback, modules ) {
|
|||||||
|
|
||||||
// Load a set of test file along with the required test infrastructure
|
// Load a set of test file along with the required test infrastructure
|
||||||
function requireTests( dependencies, noBackCompat ) {
|
function requireTests( dependencies, noBackCompat ) {
|
||||||
dependencies = [
|
var preDependencies = [
|
||||||
"lib/qunit",
|
"lib/qunit",
|
||||||
noBackCompat ? "jquery-no-back-compat" : "jquery",
|
noBackCompat ? "jquery-no-back-compat" : "jquery",
|
||||||
"jquery-simulate"
|
"jquery-simulate"
|
||||||
].concat( dependencies );
|
];
|
||||||
|
|
||||||
|
// Load migrate before test files
|
||||||
|
if ( parseUrl().migrate ) {
|
||||||
|
preDependencies.push( "jquery-migrate" );
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies = preDependencies.concat( dependencies );
|
||||||
|
|
||||||
// Load the TestSwarm injector, if necessary
|
// Load the TestSwarm injector, if necessary
|
||||||
if ( parseUrl().swarmURL ) {
|
if ( parseUrl().swarmURL ) {
|
||||||
dependencies.push( "testswarm" );
|
dependencies.push( "testswarm" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( parseUrl().migrate ) {
|
|
||||||
dependencies.push( "jquery-migrate" );
|
|
||||||
}
|
|
||||||
|
|
||||||
requireModules( dependencies, function( QUnit ) {
|
requireModules( dependencies, function( QUnit ) {
|
||||||
QUnit.start();
|
QUnit.start();
|
||||||
} );
|
} );
|
||||||
|
Loading…
Reference in New Issue
Block a user