@@ -31,25 +31,25 @@ describe('link_node_modules', () => {
3131 mkdirp ( workspace ) ;
3232 } ) ;
3333
34- it ( 'should report when modules manifest absent' , ( ) => {
34+ it ( 'should report when modules manifest absent' , async ( ) => {
3535 try {
36- ( linker as any ) . main ( ) ;
36+ await ( linker as any ) . main ( ) ;
3737 } catch ( expected ) {
3838 expect ( expected . message ) . toContain ( 'requires one argument' ) ;
3939 }
4040 try {
41- ( linker as any ) . main ( [ ] ) ;
41+ await ( linker as any ) . main ( [ ] ) ;
4242 } catch ( expected ) {
4343 expect ( expected . message ) . toContain ( 'requires one argument' ) ;
4444 }
4545 try {
46- ( linker as any ) . main ( [ 'bad_path' ] ) ;
46+ await ( linker as any ) . main ( [ 'bad_path' ] ) ;
4747 } catch ( expected ) {
4848 expect ( expected . message ) . toContain ( 'ENOENT' ) ;
4949 }
5050 } ) ;
5151
52- it ( 'should handle first-party packages in workspace' , ( ) => {
52+ it ( 'should handle first-party packages in workspace' , async ( ) => {
5353 // Set the cwd() like Bazel would in the execroot
5454 process . chdir ( workspace ) ;
5555
@@ -62,15 +62,15 @@ describe('link_node_modules', () => {
6262 'workspace' : workspace ,
6363 } ) ;
6464
65- linker . main ( [ 'manifest.json' ] , { dir : process . env [ 'RUNFILES_DIR' ] } as any ) ;
65+ await linker . main ( [ 'manifest.json' ] , { dir : process . env [ 'RUNFILES_DIR' ] } as any ) ;
6666
6767 // The linker expects to run as its own process, so it changes the wd
6868 process . chdir ( path . join ( ) ) ;
6969 expect ( fs . readdirSync ( path . join ( process . env [ 'TEST_TMPDIR' ] ! , workspace , 'node_modules' , 'a' ) ) )
7070 . toContain ( 'index.js' ) ;
7171 } ) ;
7272
73- it ( 'should handle third-party packages in runfiles' , ( ) => {
73+ it ( 'should handle third-party packages in runfiles' , async ( ) => {
7474 mkdirp ( 'npm/node_modules/some-package' ) ;
7575 const idx = 'npm/node_modules/some-package/index.js' ;
7676 fs . writeFileSync ( idx , 'exports = {}' , 'utf-8' ) ;
@@ -82,7 +82,7 @@ describe('link_node_modules', () => {
8282 writeManifest ( { 'root' : 'npm/node_modules' } ) ;
8383 writeRunfiles ( runfilesManifest ) ;
8484
85- linker . main ( [ 'manifest.json' ] , new linker . Runfiles ( ) ) ;
85+ await linker . main ( [ 'manifest.json' ] , new linker . Runfiles ( ) ) ;
8686
8787 // The linker expects to run as its own process, so it changes the wd
8888 process . chdir ( path . join ( process . env [ 'TEST_TMPDIR' ] ! , workspace ) ) ;
0 commit comments