QUnit.config.autostart
version added: 1.0.0
Description
Start running the tests once all files have been loaded.
type | boolean |
---|---|
default | true |
By default, QUnit starts running the tests when load
event is triggered on the window
(in the browser), or after all specified files have been imported (in the CLI).
Set this property to false
if you load your test files asynchronously through custom means (e.g. RequireJS). Remember to call QUnit.start()
once you’re ready for tests to begin running.
Example
Disable autostart when loading tests asynchronously, such as when using RequireJS:
QUnit.config.autostart = false;
require(
[
'tests/testModule1',
'tests/testModule2'
],
function () {
QUnit.start();
}
);