File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- require ( '../common' ) ;
3
+ const common = require ( '../common' ) ;
4
+ const fixtures = require ( '../common/fixtures' ) ;
4
5
const { spawn } = require ( 'child_process' ) ;
5
6
const assert = require ( 'assert' ) ;
6
- const path = require ( 'path' ) ;
7
7
8
- const entry = path . resolve ( __dirname , '../fixtures /es-modules/cjs.js') ;
8
+ const entry = fixtures . path ( ' /es-modules/cjs.js') ;
9
9
10
10
const child = spawn ( process . execPath , [ '--experimental-modules' , entry ] ) ;
11
11
let experimentalWarning = false ;
@@ -21,7 +21,7 @@ child.stdout.on('data', (data) => {
21
21
assert . strictEqual ( data . toString ( ) , 'executed\n' ) ;
22
22
validatedExecution = true ;
23
23
} ) ;
24
- child . on ( 'close' , ( code , stdout ) => {
24
+ child . on ( 'close' , common . mustCall ( ( code , stdout ) => {
25
25
assert . strictEqual ( validatedExecution , true ) ;
26
26
assert . strictEqual ( code , 0 ) ;
27
- } ) ;
27
+ } ) ) ;
You can’t perform that action at this time.
0 commit comments