File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,26 @@ start();
82
82
Also make sure that you have set ` ENV.APP.autoboot = false; ` for the ` test `
83
83
environment in your ` config/environment.js ` .
84
84
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
+
85
105
### Setup Tests
86
106
87
107
The ` 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