mirror of
https://gitee.com/actions-mirror/docker-login-action
synced 2024-11-23 20:30:41 +08:00
4b15841c41
* Create docker.test.ts * Add context tests * test main
17 lines
413 B
TypeScript
17 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();
|
|
});
|