@@ -33,30 +33,36 @@ describe('installer tests', () => {
33
33
} ) ;
34
34
35
35
it ( 'Sets up npmrc for npmjs' , async ( ) => {
36
- await auth . configAuthentication ( 'https://registry.npmjs.org/' ) ;
36
+ await auth . configAuthentication ( 'https://registry.npmjs.org/' , 'false' ) ;
37
37
expect ( fs . existsSync ( rcFile ) ) . toBe ( true ) ;
38
38
expect ( fs . readFileSync ( rcFile , { encoding : 'utf8' } ) ) . toMatchSnapshot ( ) ;
39
39
} ) ;
40
40
41
41
it ( 'Appends trailing slash to registry' , async ( ) => {
42
- await auth . configAuthentication ( 'https://registry.npmjs.org' ) ;
42
+ await auth . configAuthentication ( 'https://registry.npmjs.org' , 'false' ) ;
43
43
44
44
expect ( fs . existsSync ( rcFile ) ) . toBe ( true ) ;
45
45
expect ( fs . readFileSync ( rcFile , { encoding : 'utf8' } ) ) . toMatchSnapshot ( ) ;
46
46
} ) ;
47
47
48
48
it ( 'Configures scoped npm registries' , async ( ) => {
49
49
process . env [ 'INPUT_SCOPE' ] = 'myScope' ;
50
- await auth . configAuthentication ( 'https://registry.npmjs.org' ) ;
50
+ await auth . configAuthentication ( 'https://registry.npmjs.org' , 'false' ) ;
51
51
52
52
expect ( fs . existsSync ( rcFile ) ) . toBe ( true ) ;
53
53
expect ( fs . readFileSync ( rcFile , { encoding : 'utf8' } ) ) . toMatchSnapshot ( ) ;
54
54
} ) ;
55
55
56
56
it ( 'Automatically configures GPR scope' , async ( ) => {
57
- await auth . configAuthentication ( 'npm.pkg.github.com' ) ;
57
+ await auth . configAuthentication ( 'npm.pkg.github.com' , 'false' ) ;
58
58
59
59
expect ( fs . existsSync ( rcFile ) ) . toBe ( true ) ;
60
60
expect ( fs . readFileSync ( rcFile , { encoding : 'utf8' } ) ) . toMatchSnapshot ( ) ;
61
61
} ) ;
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
+ } ) ;
62
68
} ) ;
0 commit comments