mirror of
https://github.com/docker/login-action.git
synced 2025-04-19 01:26:45 +00:00
Fix tests
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
1c2cf9942d
commit
1c402b7c97
2 changed files with 29 additions and 4 deletions
|
@ -2,13 +2,21 @@ import osm = require('os');
|
|||
|
||||
import {getInputs} from '../src/context';
|
||||
|
||||
test('without username getInputs throws errors', async () => {
|
||||
expect(() => {
|
||||
getInputs();
|
||||
}).toThrowError('Input required and not supplied: username');
|
||||
});
|
||||
|
||||
test('without password getInputs throws errors', async () => {
|
||||
process.env['INPUT_USERNAME'] = 'dbowie';
|
||||
expect(() => {
|
||||
getInputs();
|
||||
}).toThrowError('Input required and not supplied: password');
|
||||
});
|
||||
|
||||
test('with password getInputs does not error', async () => {
|
||||
test('with password and username getInputs does not error', async () => {
|
||||
process.env['INPUT_USERNAME'] = 'dbowie';
|
||||
process.env['INPUT_PASSWORD'] = 'groundcontrol';
|
||||
expect(() => {
|
||||
getInputs();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue