@@ -156,48 +156,45 @@ test.serial(
156156
157157// since alternative registries are not consistent in implementing `npm whoami`,
158158// the best we can attempt to verify is to do a dry run publish and check for auth warnings
159- test . serial (
160- "that the token is considered invalid when the publish dry run fails when publishing to a custom registry" ,
161- async ( t ) => {
162- const otherRegistry = "https://other.registry.org" ;
163- const execaResult = Promise . resolve ( {
164- stderr : [ "foo" , "bar" , "baz" , `This command requires you to be logged in to ${ otherRegistry } ` , "qux" ] ,
165- } ) ;
166- execaResult . stderr = { pipe : ( ) => undefined } ;
167- execaResult . stdout = { pipe : ( ) => undefined } ;
168- td . when ( getRegistry ( pkg , context ) ) . thenReturn ( otherRegistry ) ;
169- td . when ( oidcContextEstablished ( otherRegistry , pkg , context ) ) . thenResolve ( false ) ;
170- td . when (
171- execa (
172- "npm" ,
173- [
174- "publish" ,
175- cwd ,
176- "--dry-run" ,
177- "--tag=semantic-release-auth-check" ,
178- "--userconfig" ,
179- npmrc ,
180- "--registry" ,
181- otherRegistry ,
182- ] ,
183- {
184- cwd,
185- env : otherEnvVars ,
186- preferLocal : true ,
187- lines : true ,
188- }
189- )
190- ) . thenReturn ( execaResult ) ;
159+ test . skip ( "that the token is considered invalid when the publish dry run fails when publishing to a custom registry" , async ( t ) => {
160+ const otherRegistry = "https://other.registry.org" ;
161+ const execaResult = Promise . resolve ( {
162+ stderr : [ "foo" , "bar" , "baz" , `This command requires you to be logged in to ${ otherRegistry } ` , "qux" ] ,
163+ } ) ;
164+ execaResult . stderr = { pipe : ( ) => undefined } ;
165+ execaResult . stdout = { pipe : ( ) => undefined } ;
166+ td . when ( getRegistry ( pkg , context ) ) . thenReturn ( otherRegistry ) ;
167+ td . when ( oidcContextEstablished ( otherRegistry , pkg , context ) ) . thenResolve ( false ) ;
168+ td . when (
169+ execa (
170+ "npm" ,
171+ [
172+ "publish" ,
173+ cwd ,
174+ "--dry-run" ,
175+ "--tag=semantic-release-auth-check" ,
176+ "--userconfig" ,
177+ npmrc ,
178+ "--registry" ,
179+ otherRegistry ,
180+ ] ,
181+ {
182+ cwd,
183+ env : otherEnvVars ,
184+ preferLocal : true ,
185+ lines : true ,
186+ }
187+ )
188+ ) . thenReturn ( execaResult ) ;
191189
192- const {
193- errors : [ error ] ,
194- } = await t . throwsAsync ( verifyAuth ( npmrc , pkg , { } , context ) ) ;
190+ const {
191+ errors : [ error ] ,
192+ } = await t . throwsAsync ( verifyAuth ( npmrc , pkg , { } , context ) ) ;
195193
196- t . is ( error . name , "SemanticReleaseError" ) ;
197- t . is ( error . code , "EINVALIDNPMAUTH" ) ;
198- t . is ( error . message , "Invalid npm authentication." ) ;
199- }
200- ) ;
194+ t . is ( error . name , "SemanticReleaseError" ) ;
195+ t . is ( error . code , "EINVALIDNPMAUTH" ) ;
196+ t . is ( error . message , "Invalid npm authentication." ) ;
197+ } ) ;
201198
202199test . serial ( "that errors from setting up auth bubble through this function" , async ( t ) => {
203200 const registry = DEFAULT_NPM_REGISTRY ;
0 commit comments