@@ -30,7 +30,7 @@ test.serial(
3030 "that the auth context for the official registry is considered valid when trusted publishing is established" ,
3131 async ( t ) => {
3232 td . when ( getRegistry ( pkg , context ) ) . thenReturn ( DEFAULT_NPM_REGISTRY ) ;
33- td . when ( oidcContextEstablished ( DEFAULT_NPM_REGISTRY , pkg , context ) ) . thenReturn ( true ) ;
33+ td . when ( oidcContextEstablished ( DEFAULT_NPM_REGISTRY , pkg , context ) ) . thenResolve ( true ) ;
3434
3535 await t . notThrowsAsync ( verifyAuth ( npmrc , pkg , context ) ) ;
3636 }
@@ -40,7 +40,7 @@ test.serial(
4040 "that the provided token is verified with `npm whoami` when trusted publishing is not established for the official registry" ,
4141 async ( t ) => {
4242 td . when ( getRegistry ( pkg , context ) ) . thenReturn ( DEFAULT_NPM_REGISTRY ) ;
43- td . when ( oidcContextEstablished ( DEFAULT_NPM_REGISTRY , pkg , context ) ) . thenReturn ( false ) ;
43+ td . when ( oidcContextEstablished ( DEFAULT_NPM_REGISTRY , pkg , context ) ) . thenResolve ( false ) ;
4444 td . when (
4545 execa ( "npm" , [ "whoami" , "--userconfig" , npmrc , "--registry" , DEFAULT_NPM_REGISTRY ] , {
4646 cwd,
@@ -60,7 +60,7 @@ test.serial(
6060 "that the auth context for the official registry is considered invalid when no token is provided and trusted publishing is not established" ,
6161 async ( t ) => {
6262 td . when ( getRegistry ( pkg , context ) ) . thenReturn ( DEFAULT_NPM_REGISTRY ) ;
63- td . when ( oidcContextEstablished ( DEFAULT_NPM_REGISTRY , pkg , context ) ) . thenReturn ( false ) ;
63+ td . when ( oidcContextEstablished ( DEFAULT_NPM_REGISTRY , pkg , context ) ) . thenResolve ( false ) ;
6464 td . when (
6565 execa ( "npm" , [ "whoami" , "--userconfig" , npmrc , "--registry" , DEFAULT_NPM_REGISTRY ] , {
6666 cwd,
@@ -89,7 +89,7 @@ test.serial(
8989 execaResult . stderr = { pipe : ( ) => undefined } ;
9090 execaResult . stdout = { pipe : ( ) => undefined } ;
9191 td . when ( getRegistry ( pkg , context ) ) . thenReturn ( otherRegistry ) ;
92- td . when ( oidcContextEstablished ( DEFAULT_NPM_REGISTRY , pkg , context ) ) . thenReturn ( false ) ;
92+ td . when ( oidcContextEstablished ( DEFAULT_NPM_REGISTRY , pkg , context ) ) . thenResolve ( false ) ;
9393 td . when (
9494 execa (
9595 "npm" ,
@@ -127,7 +127,7 @@ test.serial(
127127 execaResult . stderr = { pipe : ( ) => undefined } ;
128128 execaResult . stdout = { pipe : ( ) => undefined } ;
129129 td . when ( getRegistry ( pkg , context ) ) . thenReturn ( otherRegistry ) ;
130- td . when ( oidcContextEstablished ( otherRegistry , pkg , context ) ) . thenReturn ( false ) ;
130+ td . when ( oidcContextEstablished ( otherRegistry , pkg , context ) ) . thenResolve ( false ) ;
131131 td . when (
132132 execa (
133133 "npm" ,
@@ -163,7 +163,7 @@ test.serial("that errors from setting up auth bubble through this function", asy
163163 const registry = DEFAULT_NPM_REGISTRY ;
164164 const thrownError = new Error ( ) ;
165165 td . when ( getRegistry ( pkg , context ) ) . thenReturn ( registry ) ;
166- td . when ( oidcContextEstablished ( registry , pkg , context ) ) . thenReturn ( false ) ;
166+ td . when ( oidcContextEstablished ( registry , pkg , context ) ) . thenResolve ( false ) ;
167167 td . when ( setNpmrcAuth ( npmrc , registry , context ) ) . thenThrow ( new AggregateError ( [ thrownError ] ) ) ;
168168
169169 const {
0 commit comments