Skip to content

Commit 8cdab4f

Browse files
authored
test: semver compare for rc releases (#1704)
1 parent c197173 commit 8cdab4f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/cmd/upgrade.test.ts

+9
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,12 @@ describe('filterUpgrades', () => {
1414
expect(upgrade.filterUpgrades('1.1.3', inputData)).toEqual(expectedData)
1515
})
1616
})
17+
18+
describe('filterUpgrades RC version', () => {
19+
it('should filter out lower versions', () => {
20+
const inputData = [{ version: '2.1.0' }, { version: '2.1.1' }]
21+
const expectedData = [{ version: '2.1.0' }, { version: '2.1.1' }]
22+
23+
expect(upgrade.filterUpgrades('2.1.1-rc.1', inputData)).toEqual(expectedData)
24+
})
25+
})

0 commit comments

Comments
 (0)