@@ -60,7 +60,11 @@ test.serial('Preserve home ".npmrc"', async t => {
6060await require ( '../lib/set-npmrc-auth' ) ( npmrc , 'http://custom.registry.com' , { cwd, env, logger :t . context . logger } ) ;
6161
6262t . is ( ( await readFile ( npmrc ) ) . toString ( ) , `home_config = test\n//custom.registry.com/:_authToken = \${NPM_TOKEN}` ) ;
63- t . deepEqual ( t . context . log . args [ 1 ] , [ `Wrote NPM_TOKEN to${ npmrc } ` ] ) ;
63+ t . deepEqual ( t . context . log . args [ 1 ] , [
64+ 'Reading npm config from %s' ,
65+ [ path . resolve ( process . env . HOME , '.npmrc' ) ] . join ( ', ' ) ,
66+ ] ) ;
67+ t . deepEqual ( t . context . log . args [ 2 ] , [ `Wrote NPM_TOKEN to${ npmrc } ` ] ) ;
6468} ) ;
6569
6670test . serial ( 'Preserve home and local ".npmrc"' , async t => {
@@ -79,7 +83,11 @@ test.serial('Preserve home and local ".npmrc"', async t => {
7983( await readFile ( npmrc ) ) . toString ( ) ,
8084`home_config = test\ncwd_config = test\n//custom.registry.com/:_authToken = \${NPM_TOKEN}`
8185) ;
82- t . deepEqual ( t . context . log . args [ 1 ] , [ `Wrote NPM_TOKEN to${ npmrc } ` ] ) ;
86+ t . deepEqual ( t . context . log . args [ 1 ] , [
87+ 'Reading npm config from %s' ,
88+ [ path . resolve ( process . env . HOME , '.npmrc' ) , path . resolve ( cwd , '.npmrc' ) ] . join ( ', ' ) ,
89+ ] ) ;
90+ t . deepEqual ( t . context . log . args [ 2 ] , [ `Wrote NPM_TOKEN to${ npmrc } ` ] ) ;
8391} ) ;
8492
8593test . serial ( 'Preserve all ".npmrc" if auth is already configured' , async t => {
@@ -94,7 +102,10 @@ test.serial('Preserve all ".npmrc" if auth is already configured', async t => {
94102await require ( '../lib/set-npmrc-auth' ) ( npmrc , 'http://custom.registry.com' , { cwd, env :{ } , logger :t . context . logger } ) ;
95103
96104t . is ( ( await readFile ( npmrc ) ) . toString ( ) , `home_config = test\n//custom.registry.com/:_authToken = \${NPM_TOKEN}` ) ;
97- t . is ( t . context . log . callCount , 1 ) ;
105+ t . deepEqual ( t . context . log . args [ 1 ] , [
106+ 'Reading npm config from %s' ,
107+ [ path . resolve ( process . env . HOME , '.npmrc' ) , path . resolve ( cwd , '.npmrc' ) ] . join ( ', ' ) ,
108+ ] ) ;
98109} ) ;
99110
100111test . serial ( 'Preserve ".npmrc" if auth is already configured for a scoped package' , async t => {
@@ -115,7 +126,10 @@ test.serial('Preserve ".npmrc" if auth is already configured for a scoped packag
115126( await readFile ( npmrc ) ) . toString ( ) ,
116127`home_config = test\n@scope:registry=http://custom.registry.com\n//custom.registry.com/:_authToken = \${NPM_TOKEN}`
117128) ;
118- t . is ( t . context . log . callCount , 1 ) ;
129+ t . deepEqual ( t . context . log . args [ 1 ] , [
130+ 'Reading npm config from %s' ,
131+ [ path . resolve ( process . env . HOME , '.npmrc' ) , path . resolve ( cwd , '.npmrc' ) ] . join ( ', ' ) ,
132+ ] ) ;
119133} ) ;
120134
121135test . serial ( 'Throw error if "NPM_TOKEN" is missing' , async t => {
@@ -148,7 +162,7 @@ test.serial('Emulate npm config resolution if "NPM_CONFIG_USERCONFIG" is set', a
148162} ) ;
149163
150164t . is ( ( await readFile ( npmrc ) ) . toString ( ) , `//custom.registry.com/:_authToken = \${NPM_TOKEN}` ) ;
151- t . is ( t . context . log . callCount , 1 ) ;
165+ t . deepEqual ( t . context . log . args [ 1 ] , [ 'Reading npm config from %s' , [ path . resolve ( cwd , '.custom-npmrc' ) ] . join ( ', ' ) ] ) ;
152166} ) ;
153167
154168test . serial ( 'Throw error if "NPM_USERNAME" is missing' , async t => {