mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Fix test runner with phantomjs and dojo loader.
This commit is contained in:
@@ -36,9 +36,9 @@
|
|||||||
document.write('<script src="' + (ui.isModularize ? '../lodash.js' : ui.buildPath) + '"><\/script>');
|
document.write('<script src="' + (ui.isModularize ? '../lodash.js' : ui.buildPath) + '"><\/script>');
|
||||||
|
|
||||||
// load test.js if not using require.js
|
// load test.js if not using require.js
|
||||||
document.write(ui.urlParams.loader != 'none'
|
document.write(ui.urlParams.loader == 'none'
|
||||||
? '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
? '<script src="test.js"><\/script>'
|
||||||
: '<script src="test.js"><\/script>'
|
: '<script data-dojo-config="async:1" src="' + ui.loaderPath + '"><\/script>'
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -4656,8 +4656,6 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// configure QUnit and call `QUnit.start()` for
|
|
||||||
// Narwhal, Node.js, PhantomJS, Rhino, and RingoJS
|
|
||||||
if (!document) {
|
if (!document) {
|
||||||
QUnit.config.noglobals = true;
|
QUnit.config.noglobals = true;
|
||||||
QUnit.start();
|
QUnit.start();
|
||||||
|
|||||||
8
vendor/qunit-clib/qunit-clib.js
vendored
8
vendor/qunit-clib/qunit-clib.js
vendored
@@ -276,9 +276,11 @@
|
|||||||
context[methodName] = QUnit[methodName];
|
context[methodName] = QUnit[methodName];
|
||||||
});
|
});
|
||||||
|
|
||||||
// must call `QUnit.start()` in the test file if using QUnit < 1.3.0 with
|
// must call `QUnit.start()` in the test file if not loaded in a browser
|
||||||
// Node.js or any version of QUnit with Narwhal, PhantomJS, Rhino, or RingoJS
|
if (!context.document || context.phantom) {
|
||||||
QUnit.init();
|
QUnit.config.autostart = false;
|
||||||
|
QUnit.init();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|||||||
Reference in New Issue
Block a user