mirror of
https://github.com/actions/setup-node
synced 2025-04-19 22:53:12 +00:00
add test
This commit is contained in:
parent
394059ca5f
commit
94051ba93e
@ -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…
Reference in New Issue
Block a user