mirror of
https://github.com/dtolnay/rust-toolchain.git
synced 2025-06-07 19:26:37 +00:00
Initial version
This commit is contained in:
commit
644dd49b85
12 changed files with 5315 additions and 0 deletions
22
__tests__/args.test.ts
Normal file
22
__tests__/args.test.ts
Normal 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);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue