File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ function apiCreator(options) {
1414 options . powerAssert = true ;
1515 options . projectDir = options . projectDir || ROOT_DIR ;
1616 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 ;
1822}
1923
2024generateTests ( 'Without Pool: ' , options => apiCreator ( options || { } ) ) ;
@@ -76,9 +80,12 @@ function generateTests(prefix, apiCreator) {
7680 test ( `${ prefix } precompile helpers` , t => {
7781 t . plan ( 1 ) ;
7882
79- const api = apiCreator ( ) ;
83+ const api = apiCreator ( {
84+ precompileHelpers : true ,
85+ resolveTestsFrom : path . join ( __dirname , 'fixture/precompile-helpers' )
86+ } ) ;
8087
81- return api . run ( [ path . join ( __dirname , 'fixture/precompile-helpers/test/test.js' ) ] )
88+ return api . run ( )
8289 . then ( result => {
8390 t . is ( result . passCount , 1 ) ;
8491 } ) ;
You can’t perform that action at this time.
0 commit comments