aboutsummaryrefslogtreecommitdiffstats
path: root/test/data/testinit.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/data/testinit.js')
-rw-r--r--test/data/testinit.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/data/testinit.js b/test/data/testinit.js
index 4088e4671..61ffcbc8f 100644
--- a/test/data/testinit.js
+++ b/test/data/testinit.js
@@ -301,10 +301,11 @@ this.loadTests = function() {
// QUnit.config is populated from QUnit.urlParams but only at the beginning
// of the test run. We need to read both.
- var amd = QUnit.config.amd || QUnit.urlParams.amd;
+ var esmodules = QUnit.config.esmodules || QUnit.urlParams.esmodules,
+ amd = QUnit.config.amd || QUnit.urlParams.amd;
// Directly load tests that need evaluation before DOMContentLoaded.
- if ( !amd || document.readyState === "loading" ) {
+ if ( ( !esmodules && !amd ) || document.readyState === "loading" ) {
document.write( "<script src='" + parentUrl + "test/unit/ready.js'><\x2Fscript>" );
} else {
QUnit.module( "ready", function() {
@@ -360,7 +361,11 @@ this.loadTests = function() {
}
} else {
- QUnit.load();
+ if ( window.__karma__ && window.__karma__.start ) {
+ window.__karma__.start();
+ } else {
+ QUnit.load();
+ }
/**
* Run in noConflict mode