@@ -8,8 +8,7 @@ import * as stateHelper from '../src/state-helper';
88import * as core from '@actions/core' ;
99
1010test ( 'errors without username and password' , async ( ) => {
11- const platSpy = jest . spyOn ( osm , 'platform' ) . mockImplementation ( ( ) => 'linux' ) ;
12-
11+ jest . spyOn ( osm , 'platform' ) . mockImplementation ( ( ) => 'linux' ) ;
1312 process . env [ 'INPUT_LOGOUT' ] = 'true' ; // default value
1413 const coreSpy = jest . spyOn ( core , 'setFailed' ) ;
1514
@@ -18,21 +17,21 @@ test('errors without username and password', async () => {
1817} ) ;
1918
2019test ( 'successful with username and password' , async ( ) => {
21- const platSpy = jest . spyOn ( osm , 'platform' ) . mockImplementation ( ( ) => 'linux' ) ;
20+ jest . spyOn ( osm , 'platform' ) . mockImplementation ( ( ) => 'linux' ) ;
2221 const setRegistrySpy = jest . spyOn ( stateHelper , 'setRegistry' ) ;
2322 const setLogoutSpy = jest . spyOn ( stateHelper , 'setLogout' ) ;
2423 const dockerSpy = jest . spyOn ( docker , 'login' ) . mockImplementation ( jest . fn ( ) ) ;
2524
26- const username : string = 'dbowie' ;
25+ const username = 'dbowie' ;
2726 process . env [ `INPUT_USERNAME` ] = username ;
2827
29- const password : string = 'groundcontrol' ;
28+ const password = 'groundcontrol' ;
3029 process . env [ `INPUT_PASSWORD` ] = password ;
3130
32- const ecr : string = 'auto' ;
31+ const ecr = 'auto' ;
3332 process . env [ 'INPUT_ECR' ] = ecr ;
3433
35- const logout : boolean = false ;
34+ const logout = false ;
3635 process . env [ 'INPUT_LOGOUT' ] = String ( logout ) ;
3736
3837 await run ( ) ;
@@ -43,25 +42,25 @@ test('successful with username and password', async () => {
4342} ) ;
4443
4544test ( 'calls docker login' , async ( ) => {
46- const platSpy = jest . spyOn ( osm , 'platform' ) . mockImplementation ( ( ) => 'linux' ) ;
45+ jest . spyOn ( osm , 'platform' ) . mockImplementation ( ( ) => 'linux' ) ;
4746 const setRegistrySpy = jest . spyOn ( stateHelper , 'setRegistry' ) ;
4847 const setLogoutSpy = jest . spyOn ( stateHelper , 'setLogout' ) ;
4948 const dockerSpy = jest . spyOn ( docker , 'login' ) ;
5049 dockerSpy . mockImplementation ( jest . fn ( ) ) ;
5150
52- const username : string = 'dbowie' ;
51+ const username = 'dbowie' ;
5352 process . env [ `INPUT_USERNAME` ] = username ;
5453
55- const password : string = 'groundcontrol' ;
54+ const password = 'groundcontrol' ;
5655 process . env [ `INPUT_PASSWORD` ] = password ;
5756
58- const registry : string = 'ghcr.io' ;
57+ const registry = 'ghcr.io' ;
5958 process . env [ `INPUT_REGISTRY` ] = registry ;
6059
61- const ecr : string = 'auto' ;
60+ const ecr = 'auto' ;
6261 process . env [ 'INPUT_ECR' ] = ecr ;
6362
64- const logout : boolean = true ;
63+ const logout = true ;
6564 process . env [ 'INPUT_LOGOUT' ] = String ( logout ) ;
6665
6766 await run ( ) ;
0 commit comments