update generated content
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									713d7298f6
								
							
						
					
					
						commit
						dcd1f1fe0a
					
				@ -7,5 +7,5 @@ test('with password and username getInputs does not throw error', async () => {
 | 
			
		||||
  process.env['INPUT_LOGOUT'] = 'true';
 | 
			
		||||
  expect(() => {
 | 
			
		||||
    getInputs();
 | 
			
		||||
  }).not.toThrowError();
 | 
			
		||||
  }).not.toThrow();
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
@ -8,14 +8,14 @@ import * as stateHelper from '../src/state-helper';
 | 
			
		||||
test('errors without username and password', async () => {
 | 
			
		||||
  jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
 | 
			
		||||
  process.env['INPUT_LOGOUT'] = 'true'; // default value
 | 
			
		||||
  await expect(main()).rejects.toThrowError(new Error('Username and password required'));
 | 
			
		||||
  await expect(main()).rejects.toThrow(new Error('Username and password required'));
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
test('successful with username and password', async () => {
 | 
			
		||||
  jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
 | 
			
		||||
  const setRegistrySpy = jest.spyOn(stateHelper, 'setRegistry');
 | 
			
		||||
  const setLogoutSpy = jest.spyOn(stateHelper, 'setLogout');
 | 
			
		||||
  const dockerSpy = jest.spyOn(docker, 'login').mockImplementation(jest.fn());
 | 
			
		||||
  const dockerSpy = jest.spyOn(docker, 'login').mockImplementation(() => Promise.resolve());
 | 
			
		||||
 | 
			
		||||
  const username = 'dbowie';
 | 
			
		||||
  process.env[`INPUT_USERNAME`] = username;
 | 
			
		||||
@ -40,8 +40,7 @@ test('calls docker login', async () => {
 | 
			
		||||
  jest.spyOn(osm, 'platform').mockImplementation(() => 'linux');
 | 
			
		||||
  const setRegistrySpy = jest.spyOn(stateHelper, 'setRegistry');
 | 
			
		||||
  const setLogoutSpy = jest.spyOn(stateHelper, 'setLogout');
 | 
			
		||||
  const dockerSpy = jest.spyOn(docker, 'login');
 | 
			
		||||
  dockerSpy.mockImplementation(jest.fn());
 | 
			
		||||
  const dockerSpy = jest.spyOn(docker, 'login').mockImplementation(() => Promise.resolve());
 | 
			
		||||
 | 
			
		||||
  const username = 'dbowie';
 | 
			
		||||
  process.env[`INPUT_USERNAME`] = username;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/sourcemap-register.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/sourcemap-register.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user