Skip to content

Commit 8c33a27

Browse files
committed
Work around issue with ember-cli calling Testem.hookIntoTestFramework
This is normally handled for folks by ember-qunit, but @ember/test-helpers has to handle it for itself. We need to get this fixed over in ember-cli...
1 parent 941f801 commit 8c33a27

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

ember-cli-build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function (defaults) {
99
testGenerator: 'qunit',
1010
},
1111
trees: {
12-
vendor: null,
12+
vendor: 'tests/dummy/vendor',
1313
},
1414
};
1515

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// eslint-disable-next-line no-unused-vars
2+
/* global runningTests: true */
3+
4+
/*
5+
used to determine if the application should be booted immediately when `app-name.js` is evaluated
6+
when `runningTests` the `app-name.js` file will **not** import the applications `app/app.js` and
7+
call `Application.create(...)` on it. Additionally, applications can opt-out of this behavior by
8+
setting `autoRun` to `false` in their `ember-cli-build.js`
9+
*/
10+
runningTests = true;
11+
12+
/*
13+
This file overrides a file built into ember-cli's build pipeline and prevents
14+
this built-in `Testem.hookIntoTestFramework` invocation:
15+
16+
https://github.com/ember-cli/ember-cli/blob/v3.20.0/lib/broccoli/test-support-suffix.js#L3-L5
17+
*/

tests/test-helper.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* globals Testem */
12
import QUnit from 'qunit';
23
import { registerDeprecationHandler } from '@ember/debug';
34
import AbstractTestLoader from 'ember-cli-test-loader/test-support/index';
@@ -125,3 +126,7 @@ QUnit.assert.deprecationsInclude = function (expected) {
125126
};
126127

127128
QUnit.start();
129+
130+
if (typeof Testem !== 'undefined') {
131+
Testem.hookIntoTestFramework();
132+
}

0 commit comments

Comments
 (0)