Skip to content

Commit

Permalink
update generated content
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
CrazyMax committed Apr 17, 2023
1 parent 713d729 commit dcd1f1f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion __tests__/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
7 changes: 3 additions & 4 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sourcemap-register.js

Large diffs are not rendered by default.

0 comments on commit dcd1f1f

Please sign in to comment.