mirror of
https://github.com/actions/setup-node.git
synced 2026-03-01 06:41:05 +08:00
Addressed copilot suggestions
This commit is contained in:
parent
b50e0ad9a6
commit
c5d7f62348
@ -112,6 +112,8 @@ describe('main tests', () => {
|
||||
${'{"engines": {"node": "17.0.0"}}'} | ${'17.0.0'}
|
||||
${'{"devEngines": {"runtime": {"name": "node", "version": "22.0.0"}}}'} | ${'22.0.0'}
|
||||
${'{"devEngines": {"runtime": [{"name": "bun"}, {"name": "node", "version": "22.0.0"}]}}'} | ${'22.0.0'}
|
||||
${'{"devEngines": {"runtime": {"name": "node", "version": "22.0.0"}}, "engines": {"node": "18.0.0"}}'} | ${'22.0.0'}
|
||||
${'{"volta": {"node": "16.0.0"}, "devEngines": {"runtime": {"name": "node", "version": "22.0.0"}}, "engines": {"node": "18.0.0"}}'} | ${'16.0.0'}
|
||||
`.it('parses "$contents"', ({contents, expected}) => {
|
||||
const existsSpy = jest.spyOn(fs, 'existsSync');
|
||||
existsSpy.mockImplementation(() => true);
|
||||
|
||||
@ -112,6 +112,7 @@ When using the `package.json` input, the action will look in the following field
|
||||
}
|
||||
}
|
||||
```
|
||||
**Note:** The devEngines.runtime can either be an object or an array of objects
|
||||
|
||||
## Architecture
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user