Mostly tests and some small changes (#16)

* Create docker.test.ts
* Add context tests
* test main
This commit is contained in:
Bryan Clark 2020-10-09 03:30:45 -07:00 committed by GitHub
parent 34d5f75b0d
commit 4b15841c41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 148 additions and 8 deletions

16
__tests__/context.test.ts Normal file
View 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();
});