mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-19 12:54:45 +00:00
Add .npmrc unit and E2E tests
This commit is contained in:
parent
cdca7365b2
commit
ff0f4b6812
3 changed files with 5 additions and 1 deletions
|
@ -103,10 +103,13 @@ describe('main tests', () => {
|
|||
${''} | ${''}
|
||||
${'unknown format'} | ${'unknown format'}
|
||||
${' 14.1.0 '} | ${'14.1.0'}
|
||||
${'use-node-version=lts/iron'} | ${'lts/iron'}
|
||||
${'{"volta": {"node": ">=14.0.0 <=17.0.0"}}'}| ${'>=14.0.0 <=17.0.0'}
|
||||
${'{"volta": {"extends": "./package.json"}}'}| ${'18.0.0'}
|
||||
${'{"engines": {"node": "17.0.0"}}'} | ${'17.0.0'}
|
||||
${'{}'} | ${null}
|
||||
${'[section]use-node-version=16'} | ${null}
|
||||
${'[section]\nuse-node-version=20'} | ${null}
|
||||
`.it('parses "$contents"', ({contents, expected}) => {
|
||||
const existsSpy = jest.spyOn(fs, 'existsSync');
|
||||
existsSpy.mockImplementation(() => true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue