@@ -29,9 +29,12 @@ t.test('respects publishConfig.registry, runs appropriate scripts', async t => {
2929 publish : 'touch scripts-publish' ,
3030 postpublish : 'touch scripts-postpublish' ,
3131 } ,
32- publishConfig : { registry : alternateRegistry } ,
32+ publishConfig : {
33+ other : 'not defined' ,
34+ registry : alternateRegistry ,
35+ } ,
3336 }
34- const { npm, joinedOutput, prefix, registry } = await loadNpmWithRegistry ( t , {
37+ const { npm, joinedOutput, logs , prefix, registry } = await loadNpmWithRegistry ( t , {
3538 config : {
3639 loglevel : 'silent' ,
3740 [ `${ alternateRegistry . slice ( 6 ) } /:_authToken` ] : 'test-other-token' ,
@@ -49,6 +52,7 @@ t.test('respects publishConfig.registry, runs appropriate scripts', async t => {
4952 t . equal ( fs . existsSync ( path . join ( prefix , 'scripts-prepublish' ) ) , false , 'did not run prepublish' )
5053 t . equal ( fs . existsSync ( path . join ( prefix , 'scripts-publish' ) ) , true , 'ran publish' )
5154 t . equal ( fs . existsSync ( path . join ( prefix , 'scripts-postpublish' ) ) , true , 'ran postpublish' )
55+ t . same ( logs . warn , [ 'Unknown publishConfig config "other". This will stop working in the next major version of npm.' ] )
5256} )
5357
5458t . test ( 're-loads publishConfig.registry if added during script process' , async t => {
0 commit comments