File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,26 @@ start();
8282Also make sure that you have set ` ENV.APP.autoboot = false; ` for the ` test `
8383environment in your ` config/environment.js ` .
8484
85+ ### Load Tests
86+
87+ In environments that use the AMD Loader, ` loadTests() ` will need to be called
88+ before ` start() ` .
89+
90+ ``` javascript
91+ import Application from ' ../app' ;
92+ import config from ' ../config/environment' ;
93+ import { setApplication } from ' @ember/test-helpers' ;
94+ import { start } from ' ember-qunit' ;
95+ import { loadTests } from ' ember-qunit/test-loader' ;
96+
97+ setApplication (Application .create (config .APP ));
98+
99+ loadTests ()
100+ start ();
101+ ```
102+
103+ In ESM environments, this isn't needed as import.meta.glob can load test files.
104+
85105### Setup Tests
86106
87107The ` setupTest() ` function can be used to setup a unit test for any kind
You can’t perform that action at this time.
0 commit comments