mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-26 15:59:26 -05:00
16 lines
583 B
TypeScript
16 lines
583 B
TypeScript
import { parseNodeEditionSpecifier } from '../lib/parseNodeEditionSpecifier'
|
|
|
|
test.each([
|
|
['6', '6', 'release'],
|
|
['16.0.0-rc.0', '16.0.0-rc.0', 'rc'],
|
|
['rc/10', '10', 'rc'],
|
|
['nightly', 'latest', 'nightly'],
|
|
['lts', 'lts', 'release'],
|
|
['argon', 'argon', 'release'],
|
|
['latest', 'latest', 'release'],
|
|
])('Node.js version selector is parsed', (editionSpecifier, versionSpecifier, releaseChannel) => {
|
|
const node = parseNodeEditionSpecifier(editionSpecifier)
|
|
expect(node.versionSpecifier).toMatch(versionSpecifier)
|
|
expect(node.releaseChannel).toBe(releaseChannel)
|
|
})
|