Skip to content
Snippets Groups Projects
Unverified Commit ae05eae5 authored by Gabriel-Ladzaretti's avatar Gabriel-Ladzaretti Committed by GitHub
Browse files

test(versioning/npm): add tests to self cover npm versioning folder (#18355)

parent 09014315
No related branches found
No related tags found
No related merge requests found
...@@ -109,6 +109,21 @@ describe('modules/versioning/npm/index', () => { ...@@ -109,6 +109,21 @@ describe('modules/versioning/npm/index', () => {
${'^1.2.3'} | ${'replace'} | ${'1.2.3'} | ${'1.2.3'} | ${'^1.2.3'} ${'^1.2.3'} | ${'replace'} | ${'1.2.3'} | ${'1.2.3'} | ${'^1.2.3'}
${'^1.2.3'} | ${'replace'} | ${'1.2.3'} | ${'1.2.2'} | ${'^1.2.2'} ${'^1.2.3'} | ${'replace'} | ${'1.2.3'} | ${'1.2.2'} | ${'^1.2.2'}
${'^0.9.21'} | ${'replace'} | ${'0.9.21'} | ${'0.9.22'} | ${'^0.9.21'} ${'^0.9.21'} | ${'replace'} | ${'0.9.21'} | ${'0.9.22'} | ${'^0.9.21'}
${'1.0.0'} | ${'pin'} | ${'1.0.0'} | ${'1.0.1'} | ${'1.0.1'}
${'1.x'} | ${'update-lockfile'} | ${'1.0.0'} | ${'1.0.1'} | ${'1.x'}
${'1.x'} | ${'update-lockfile'} | ${'1.0.0'} | ${'2.0.1'} | ${'2.x'}
${'<2.0.0'} | ${'widen'} | ${'1.0.0'} | ${'2.0.1'} | ${'<3.0.0'}
${'1.0.0 - 2.0.0'} | ${'widen'} | ${'1.0.0'} | ${'2.1.0'} | ${'1.0.0 - 2.1'}
${'1.x >2.0.0'} | ${'widen'} | ${'1.0.0'} | ${'2.1.0'} | ${null}
${'^1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'2.0.0'} | ${'^2.0.0'}
${'~1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'2.0.0'} | ${'~2.0.0'}
${'>1.0.0'} | ${'bump'} | ${'1.0.0'} | ${'2.1.0'} | ${null}
${'^1.0.0-alpha'} | ${'replace'} | ${'1.0.0-alpha'} | ${'1.0.0-beta'} | ${'^1.0.0-beta'}
${'~1.0.0'} | ${'replace'} | ${'1.0.0'} | ${'1.1.0'} | ${'~1.1.0'}
${'1.0.x'} | ${'replace'} | ${'1.0.0'} | ${'1.1.0'} | ${'1.1.x'}
${'<=1.0'} | ${'replace'} | ${'1.0.0'} | ${'1.2.0'} | ${'<=1.2'}
${'<=1'} | ${'replace'} | ${'1.0.0'} | ${'2.0.0'} | ${'<=2'}
${'<= 1'} | ${'replace'} | ${'1.0.0'} | ${'2.0.0'} | ${'<= 2'}
`( `(
'getNewValue("$currentValue", "$rangeStrategy", "$currentVersion", "$newVersion") === "$expected"', 'getNewValue("$currentValue", "$rangeStrategy", "$currentVersion", "$newVersion") === "$expected"',
({ currentValue, rangeStrategy, currentVersion, newVersion, expected }) => { ({ currentValue, rangeStrategy, currentVersion, newVersion, expected }) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment