Initial version

This commit is contained in:
svartalf 2019-09-12 16:44:29 +03:00
commit 644dd49b85
12 changed files with 5315 additions and 0 deletions

22
__tests__/args.test.ts Normal file
View file

@ -0,0 +1,22 @@
import * as args from '../src/args'
const testEnvVars = {
INPUT_TOOLCHAIN: 'nightly-2019-04-20',
INPUT_DEFAULT: 'false',
INPUT_OVERRIDE: 'true'
}
describe('actions-rs/toolchain', () => {
beforeEach(() => {
for (const key in testEnvVars)
process.env[key] = testEnvVars[key as keyof typeof testEnvVars]
})
it('Parses action input into toolchain options', async () => {
const result = args.toolchain_args();
expect(result.name).toBe('nightly-2019-04-20');
expect(result.default).toBe(false);
expect(result.override).toBe(true);
});
});