Skip to content
Permalink
Browse files

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
  • Loading branch information
mgol committed May 16, 2020
1 parent 7caf8f6 commit b36d54256968b028a9c324eba6d88754561d5ec4
Showing with 9 additions and 6 deletions.
  1. +9 −6 tests/lib/bootstrap.js
@@ -60,21 +60,24 @@ function requireModules( dependencies, callback, modules ) {

// Load a set of test file along with the required test infrastructure
function requireTests( dependencies, noBackCompat ) {
dependencies = [
var preDependencies = [
"lib/qunit",
noBackCompat ? "jquery-no-back-compat" : "jquery",
"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
if ( parseUrl().swarmURL ) {
dependencies.push( "testswarm" );
}

if ( parseUrl().migrate ) {
dependencies.push( "jquery-migrate" );
}

requireModules( dependencies, function( QUnit ) {
QUnit.start();
} );

0 comments on commit b36d542

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