diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2015-09-08 18:36:02 +0200 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2015-09-08 18:36:42 +0200 |
commit | 855b0c8c288533948b257925a8906f7da3449eed (patch) | |
tree | 8f58c334653f5988908ec06eaa15668c65bab12f /test/data/testinit.js | |
parent | 2c7e9c934971500a746d012c529e13ec0b560a83 (diff) | |
download | jquery-855b0c8c288533948b257925a8906f7da3449eed.tar.gz jquery-855b0c8c288533948b257925a8906f7da3449eed.zip |
Tests: Don't load non-basic tests when basic module is selected
When loading basic tests don't load any others to not overload Android 2.3.
The drawback is that most tests are not selectable in the module dropdown
when the basic module is seelcted.
Refs 2c7e9c934971500a746d012c529e13ec0b560a83
Diffstat (limited to 'test/data/testinit.js')
-rw-r--r-- | test/data/testinit.js | 66 |
1 files changed, 37 insertions, 29 deletions
diff --git a/test/data/testinit.js b/test/data/testinit.js index 205271c12..d9cf8a2eb 100644 --- a/test/data/testinit.js +++ b/test/data/testinit.js @@ -270,41 +270,49 @@ this.iframeCallback = undefined; QUnit.config.autostart = false; this.loadTests = function() { var loadSwarm, - url = window.location.search; + url = window.location.search, + basicTests = url.substring( 1 ).split( "&" ).indexOf( "module=basic" ) > -1; url = decodeURIComponent( url.slice( url.indexOf( "swarmURL=" ) + "swarmURL=".length ) ); loadSwarm = url && url.indexOf( "http" ) === 0; // Get testSubproject from testrunner first require( [ "data/testrunner.js" ], function() { - var tests = [ - // A special module with basic tests, meant for - // not fully supported environments like Android 2.3, - // jsdom or PhantomJS. We run it everywhere, though, - // to make sure tests are not broken. - "unit/basic.js", - - "unit/core.js", - "unit/callbacks.js", - "unit/deferred.js", - "unit/support.js", - "unit/data.js", - "unit/queue.js", - "unit/attributes.js", - "unit/event.js", - "unit/selector.js", - "unit/traversing.js", - "unit/manipulation.js", - "unit/wrap.js", - "unit/css.js", - "unit/serialize.js", - "unit/ajax.js", - "unit/effects.js", - "unit/offset.js", - "unit/dimensions.js", - "unit/animation.js", - "unit/tween.js" - ]; + var tests = [] + .concat( [ + + // A special module with basic tests, meant for + // not fully supported environments like Android 2.3, + // jsdom or PhantomJS. We run it everywhere, though, + // to make sure tests are not broken. + // + // Support: Android 2.3 only + // When loading basic tests don't load any others to not + // overload Android 2.3. + "unit/basic.js" + ] ) + .concat( basicTests ? [] : [ + "unit/core.js", + "unit/callbacks.js", + "unit/deferred.js", + "unit/support.js", + "unit/data.js", + "unit/queue.js", + "unit/attributes.js", + "unit/event.js", + "unit/selector.js", + "unit/traversing.js", + "unit/manipulation.js", + "unit/wrap.js", + "unit/css.js", + "unit/serialize.js", + "unit/ajax.js", + "unit/effects.js", + "unit/offset.js", + "unit/dimensions.js", + "unit/animation.js", + "unit/tween.js" + ] ); // Ensure load order (to preserve test numbers) ( function loadDep() { |