diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2020-05-16 08:30:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-16 08:30:11 +0200 |
commit | b36d54256968b028a9c324eba6d88754561d5ec4 (patch) | |
tree | 335bd2775c9a6aa0274e6fbe710092390ed20a3a /tests/lib | |
parent | 7caf8f61df7840fb3de2478a75aec229d9f84f15 (diff) | |
download | jquery-ui-b36d54256968b028a9c324eba6d88754561d5ec4.tar.gz jquery-ui-b36d54256968b028a9c324eba6d88754561d5ec4.zip |
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
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/bootstrap.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/lib/bootstrap.js b/tests/lib/bootstrap.js index bae1afada..d0c489dc0 100644 --- a/tests/lib/bootstrap.js +++ b/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(); } ); |