Fix test runner with phantomjs and dojo loader.

This commit is contained in:
John-David Dalton
2013-09-04 21:58:34 -05:00
parent 5f8f5a9f85
commit 3560fed86e
3 changed files with 8 additions and 8 deletions

View File

@@ -276,9 +276,11 @@
context[methodName] = QUnit[methodName];
});
// must call `QUnit.start()` in the test file if using QUnit < 1.3.0 with
// Node.js or any version of QUnit with Narwhal, PhantomJS, Rhino, or RingoJS
QUnit.init();
// must call `QUnit.start()` in the test file if not loaded in a browser
if (!context.document || context.phantom) {
QUnit.config.autostart = false;
QUnit.init();
}
}
/*--------------------------------------------------------------------------*/