diff --git a/test/index.html b/test/index.html index 3a2b8b1ab..8c8ff98a7 100644 --- a/test/index.html +++ b/test/index.html @@ -42,7 +42,6 @@ ); diff --git a/test/underscore.html b/test/underscore.html index 785efe1dc..a515c6e86 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -104,39 +104,42 @@ } if (!window.require) { init(_); + } else { + QUnit.config.autostart = false; + + // load Lo-Dash as a module + require((function() { + var reModularize = /modularize/; + + var baseUrl = reModularize.test(ui.urlParams.build) + ? '../modularize/' + : ''; + + var modulePath = reModularize.test(ui.urlParams.build) + ? 'lodash' + : ui.buildPath.replace(/\.js$/, ''); + + return { + 'baseUrl': baseUrl, + 'urlArgs': 't=' + (+new Date), + 'paths': { + 'lodash': modulePath + } + }; + }()), + ['lodash'], function(lodash) { + init(lodash); + require([ + '../vendor/underscore/test/collections.js', + '../vendor/underscore/test/arrays.js', + '../vendor/underscore/test/functions.js', + '../vendor/underscore/test/objects.js', + '../vendor/underscore/test/utility.js' + ], function() { + QUnit.start(); + }); + }); } - // load Lo-Dash as a module - window.require && require( - (function() { - var reModularize = /modularize/; - - var baseUrl = reModularize.test(ui.urlParams.build) - ? '../modularize/' - : ''; - - var modulePath = reModularize.test(ui.urlParams.build) - ? 'lodash' - : ui.buildPath.replace(/\.js$/, ''); - - return { - 'baseUrl': baseUrl, - 'urlArgs': 't=' + (+new Date), - 'paths': { - 'lodash': modulePath - } - }; - }()), - ['lodash'], function(lodash) { - init(lodash); - require([ - '../vendor/underscore/test/collections.js', - '../vendor/underscore/test/arrays.js', - '../vendor/underscore/test/functions.js', - '../vendor/underscore/test/objects.js', - '../vendor/underscore/test/utility.js', - '../vendor/underscore/test/utility.js' - ]); - });