@@ -33,30 +33,36 @@ describe('installer tests', () => {
3333 } ) ;
3434
3535 it ( 'Sets up npmrc for npmjs' , async ( ) => {
36- await auth . configAuthentication ( 'https://registry.npmjs.org/' ) ;
36+ await auth . configAuthentication ( 'https://registry.npmjs.org/' , 'false' ) ;
3737 expect ( fs . existsSync ( rcFile ) ) . toBe ( true ) ;
3838 expect ( fs . readFileSync ( rcFile , { encoding : 'utf8' } ) ) . toMatchSnapshot ( ) ;
3939 } ) ;
4040
4141 it ( 'Appends trailing slash to registry' , async ( ) => {
42- await auth . configAuthentication ( 'https://registry.npmjs.org' ) ;
42+ await auth . configAuthentication ( 'https://registry.npmjs.org' , 'false' ) ;
4343
4444 expect ( fs . existsSync ( rcFile ) ) . toBe ( true ) ;
4545 expect ( fs . readFileSync ( rcFile , { encoding : 'utf8' } ) ) . toMatchSnapshot ( ) ;
4646 } ) ;
4747
4848 it ( 'Configures scoped npm registries' , async ( ) => {
4949 process . env [ 'INPUT_SCOPE' ] = 'myScope' ;
50- await auth . configAuthentication ( 'https://registry.npmjs.org' ) ;
50+ await auth . configAuthentication ( 'https://registry.npmjs.org' , 'false' ) ;
5151
5252 expect ( fs . existsSync ( rcFile ) ) . toBe ( true ) ;
5353 expect ( fs . readFileSync ( rcFile , { encoding : 'utf8' } ) ) . toMatchSnapshot ( ) ;
5454 } ) ;
5555
5656 it ( 'Automatically configures GPR scope' , async ( ) => {
57- await auth . configAuthentication ( 'npm.pkg.github.com' ) ;
57+ await auth . configAuthentication ( 'npm.pkg.github.com' , 'false' ) ;
5858
5959 expect ( fs . existsSync ( rcFile ) ) . toBe ( true ) ;
6060 expect ( fs . readFileSync ( rcFile , { encoding : 'utf8' } ) ) . toMatchSnapshot ( ) ;
6161 } ) ;
62+
63+ it ( 'Sets up npmrc for always-auth true' , async ( ) => {
64+ await auth . configAuthentication ( 'https://registry.npmjs.org/' , 'true' ) ;
65+ expect ( fs . existsSync ( rcFile ) ) . toBe ( true ) ;
66+ expect ( fs . readFileSync ( rcFile , { encoding : 'utf8' } ) ) . toMatchSnapshot ( ) ;
67+ } ) ;
6268} ) ;
0 commit comments