Skip to content

Commit

Permalink
🚨 Fix reluctant quantifier that could match versions which shouldnt b…
Browse files Browse the repository at this point in the history
…e matched
  • Loading branch information
WtfJoke committed Aug 4, 2023
1 parent d4202bb commit 3a135ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions __tests__/release.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ describe('release', () => {
it("should find the latest version that satisfies '2.x'", async () => {
const version = await getMatchingVersion('2.x')
expect(version).toBeDefined()
expect(version).toMatch(/^2\.\d\.\d*?/)
expect(version).toMatch(/^2\.\d+\.\d+/)
})

it('should find latest 2.x releases when excluding 3.0.0', async () => {
const version = await getMatchingVersion('>=2.x <3.0.0')
expect(version).toBeDefined()
expect(version).toMatch(/^2\.\d\.\d*?/)
expect(version).toMatch(/^2\.\d+\.\d+/)
})

it('should find 4.0.0-rc-2 pre-release', async () => {
Expand Down

0 comments on commit 3a135ce

Please sign in to comment.