1
0
Fork 0
mirror of https://github.com/docker/login-action.git synced 2025-03-31 12:10:05 +02:00
login-action/__tests__/context.test.ts
2020-10-07 22:31:05 -07:00

16 lines
413 B
TypeScript

import osm = require('os');
import {getInputs} from '../src/context';
test('without password getInputs throws errors', async () => {
expect(() => {
getInputs();
}).toThrowError('Input required and not supplied: password');
});
test('with password getInputs does not error', async () => {
process.env['INPUT_PASSWORD'] = 'groundcontrol';
expect(() => {
getInputs();
}).not.toThrowError();
});