Skip to content

Commit

Permalink
Merge pull request #51 from sglanzer/preserve-qunit-autostart
Browse files Browse the repository at this point in the history
Preserve Qunit autostart configuration
  • Loading branch information
sglanzer committed Apr 28, 2015
2 parents 5ac8583 + 991b827 commit 7455eff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 4 additions & 0 deletions vendor/blanket-require.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ var blanketLoader = function(moduleName) {
// Defer the start of the test run until a call to QUnit.start() this
// allows the modules to be loaded/instrumented prior to the test run
if (typeof(QUnit) === 'object') {
var autostart = QUnit.config.autostart;
window._$blanket_qunit = {
autostart: autostart
};
QUnit.config.autostart = false;
}

Expand Down
8 changes: 2 additions & 6 deletions vendor/start.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*global blanket, mocha, moduleLoaderFinish, $ */
/*global QUnit, blanket, mocha, moduleLoaderFinish, $ */

function sendCoverage() {
$.ajax({
Expand All @@ -22,11 +22,7 @@ function cliFinish() {
blanket.onTestsDone = cliFinish;

if (typeof(QUnit) === 'object') {
// I'm not sure which ember-cli release introduced this behavior,
// but QUnit.start() is called by the ember-cli framework as of
// [email protected] and causes a conflict if QUnit.start() is
// called again here
// QUnit.start();
QUnit.config.autostart = window._$blanket_qunit.autostart;
}
else if (typeof(mocha) === 'object') {

Expand Down

0 comments on commit 7455eff

Please sign in to comment.