mirror of
https://github.com/actions-rs/toolchain.git
synced 2024-11-10 19:46:32 +02:00
22 lines
609 B
TypeScript
22 lines
609 B
TypeScript
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);
|
|
});
|
|
});
|