diff --git a/ember-cli-build.js b/ember-cli-build.js index e5f72809c..8012b37da 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -9,7 +9,7 @@ module.exports = function (defaults) { testGenerator: 'qunit', }, trees: { - vendor: null, + vendor: 'tests/dummy/vendor', }, }; diff --git a/tests/dummy/vendor/ember-cli/test-support-suffix.js b/tests/dummy/vendor/ember-cli/test-support-suffix.js new file mode 100644 index 000000000..0b3c6676d --- /dev/null +++ b/tests/dummy/vendor/ember-cli/test-support-suffix.js @@ -0,0 +1,15 @@ +/** globals runningTests */ +/* + used to determine if the application should be booted immediately when `app-name.js` is evaluated + when `runningTests` the `app-name.js` file will **not** import the applications `app/app.js` and + call `Application.create(...)` on it. Additionally, applications can opt-out of this behavior by + setting `autoRun` to `false` in their `ember-cli-build.js` +*/ +runningTests = true; + +/* + This file overrides a file built into ember-cli's build pipeline and prevents + this built-in `Testem.hookIntoTestFramework` invocation: + + https://github.com/ember-cli/ember-cli/blob/v3.20.0/lib/broccoli/test-support-suffix.js#L3-L5 +*/ diff --git a/tests/test-helper.js b/tests/test-helper.js index 05f20f156..82362e937 100644 --- a/tests/test-helper.js +++ b/tests/test-helper.js @@ -1,3 +1,4 @@ +/* globals Testem */ import QUnit from 'qunit'; import { registerDeprecationHandler } from '@ember/debug'; import AbstractTestLoader from 'ember-cli-test-loader/test-support/index'; @@ -125,3 +126,7 @@ QUnit.assert.deprecationsInclude = function (expected) { }; QUnit.start(); + +if (typeof Testem !== 'undefined') { + Testem.hookIntoTestFramework(); +}