mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 09:21:00 +00:00
add test
This commit is contained in:
parent
394059ca5f
commit
94051ba93e
1 changed files with 9 additions and 0 deletions
|
@ -396,6 +396,15 @@ describe('setup-node', () => {
|
||||||
}
|
}
|
||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
|
it('enables corepack if specified', async () => {
|
||||||
|
inputs['corepack'] = 'true';
|
||||||
|
|
||||||
|
await main.run();
|
||||||
|
|
||||||
|
// It seems to call it with the absolute path to corepack, so we easily use `toHaveBeenCalledWith`
|
||||||
|
expect(cnSpy.mock.calls[2][0]).toContain('corepack enable');
|
||||||
|
});
|
||||||
|
|
||||||
describe('check-latest flag', () => {
|
describe('check-latest flag', () => {
|
||||||
it('use local version and dont check manifest if check-latest is not specified', async () => {
|
it('use local version and dont check manifest if check-latest is not specified', async () => {
|
||||||
os.platform = 'linux';
|
os.platform = 'linux';
|
||||||
|
|
Loading…
Add table
Reference in a new issue