mirror of
https://github.com/docker/login-action.git
synced 2025-06-23 03:37:58 +02:00
Mostly tests and some small changes (#16)
* Create docker.test.ts * Add context tests * test main
This commit is contained in:
16
__tests__/context.test.ts
Normal file
16
__tests__/context.test.ts
Normal file
@ -0,0 +1,16 @@
|
||||
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();
|
||||
});
|
Reference in New Issue
Block a user