11'use strict' ;
22
3- const { spawnPromisified} = require ( '../common' ) ;
3+ const { spawnPromisified } = require ( '../common' ) ;
44const fixtures = require ( '../common/fixtures.js' ) ;
55const assert = require ( 'node:assert' ) ;
6- const path = require ( 'node:path' ) ;
7- const { execPath} = require ( 'node:process' ) ;
8- const { describe, it} = require ( 'node:test' ) ;
6+ const { execPath } = require ( 'node:process' ) ;
7+ const { describe, it } = require ( 'node:test' ) ;
98
10- describe ( 'Import empty module' , { concurrency : true } , ( ) => {
11- it ( async ( ) => {
12- const { code, signal, stdout, stderr} = await spawnPromisified ( execPath , [
13- '--no-warnings' ,
14- '--eval' ,
15- 'import("empty")' ,
16- ] , {
17- cwd : fixtures . path ( ) ,
18- } ) ;
19- assert . strictEqual ( code , 1 ) ;
20- assert . strictEqual ( signal , null ) ;
21- assert . strictEqual ( stdout , '' ) ;
22- assert . match ( stderr , / E r r o r \[ E R R _ I N V A L I D _ P A C K A G E _ C O N F I G ] : I n v a l i d p a c k a g e c o n f i g / ) ;
9+ describe ( 'Import empty module' , { concurrency : true } , ( ) => {
10+ it ( async ( ) => {
11+ const { code, signal, stdout, stderr } = await spawnPromisified ( execPath , [
12+ '--no-warnings' ,
13+ '--eval' ,
14+ 'import("empty")' ,
15+ ] , {
16+ cwd : fixtures . path ( ) ,
2317 } ) ;
24- } )
18+ assert . strictEqual ( code , 1 ) ;
19+ assert . strictEqual ( signal , null ) ;
20+ assert . strictEqual ( stdout , '' ) ;
21+ assert . match ( stderr , / E r r o r \[ E R R _ I N V A L I D _ P A C K A G E _ C O N F I G ] : I n v a l i d p a c k a g e c o n f i g / ) ;
22+ } ) ;
23+ } ) ;
0 commit comments