File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ function apiCreator(options) {
14
14
options . powerAssert = true ;
15
15
options . projectDir = options . projectDir || ROOT_DIR ;
16
16
options . resolveTestsFrom = options . resolveTestsFrom || options . projectDir ;
17
- return new Api ( options ) ;
17
+ const instance = new Api ( options ) ;
18
+ if ( ! options . precompileHelpers ) {
19
+ instance . _precompileHelpers = ( ) => Promise . resolve ( ) ;
20
+ }
21
+ return instance ;
18
22
}
19
23
20
24
generateTests ( 'Without Pool: ' , options => apiCreator ( options || { } ) ) ;
@@ -76,9 +80,12 @@ function generateTests(prefix, apiCreator) {
76
80
test ( `${ prefix } precompile helpers` , t => {
77
81
t . plan ( 1 ) ;
78
82
79
- const api = apiCreator ( ) ;
83
+ const api = apiCreator ( {
84
+ precompileHelpers : true ,
85
+ resolveTestsFrom : path . join ( __dirname , 'fixture/precompile-helpers' )
86
+ } ) ;
80
87
81
- return api . run ( [ path . join ( __dirname , 'fixture/precompile-helpers/test/test.js' ) ] )
88
+ return api . run ( )
82
89
. then ( result => {
83
90
t . is ( result . passCount , 1 ) ;
84
91
} ) ;
You can’t perform that action at this time.
0 commit comments