Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/versions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ it('getMaxSatisfying', async () => {
rc: '4.2.1-rc.3',
experimental: '0.0.0-experimental-4508873393-20240430',
}))

// #256
expect('1.0.0-beta.20').toBe(getMaxSatisfying([
'1.0.0-beta.19',
'1.0.0-beta.20',
'1.0.0-beta.9-e89174b',
], '^1.0.0-beta.20', 'default', {
Comment on lines +119 to +123

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pair failing regression assertion with implementation fix

This new assertion expects getMaxSatisfying to return 1.0.0-beta.20, but the current implementation in src/utils/versions.ts still uses semver ordering (gt/satisfies) and will treat 1.0.0-beta.9-e89174b as the max satisfying candidate for this range. As a result, this commit introduces a test that fails on its own and breaks CI unless the ordering fix is included in the same change set.

Useful? React with 👍 / 👎.

latest: '0.45.2',
beta: '1.0.0-beta.20',
}))
}, 10_000)

it('deprecated filter', () => {
Expand Down