3
0
Fork 0
mirror of https://gitea.com/docker/login-action.git synced 2024-11-22 17:39:35 +01:00
docker-login/__tests__/context.test.ts
Bryan Clark 4b15841c41
Mostly tests and some small changes (#16)
* Create docker.test.ts
* Add context tests
* test main
2020-10-09 10:30:45 +00: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();
});