Skip to content

Commit b36d542

Browse files
authored
Tests: Load jQuery Migrate before UI test files
This is necessary to catch all possible warnings that the test files may trigger. Closes jquerygh-1918
1 parent 7caf8f6 commit b36d542

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/lib/bootstrap.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,24 @@ function requireModules( dependencies, callback, modules ) {
6060

6161
// Load a set of test file along with the required test infrastructure
6262
function requireTests( dependencies, noBackCompat ) {
63-
dependencies = [
63+
var preDependencies = [
6464
"lib/qunit",
6565
noBackCompat ? "jquery-no-back-compat" : "jquery",
6666
"jquery-simulate"
67-
].concat( dependencies );
67+
];
68+
69+
// Load migrate before test files
70+
if ( parseUrl().migrate ) {
71+
preDependencies.push( "jquery-migrate" );
72+
}
73+
74+
dependencies = preDependencies.concat( dependencies );
6875

6976
// Load the TestSwarm injector, if necessary
7077
if ( parseUrl().swarmURL ) {
7178
dependencies.push( "testswarm" );
7279
}
7380

74-
if ( parseUrl().migrate ) {
75-
dependencies.push( "jquery-migrate" );
76-
}
77-
7881
requireModules( dependencies, function( QUnit ) {
7982
QUnit.start();
8083
} );

0 commit comments

Comments
 (0)