Skip to content

Commit

Permalink
add a couple of extra test cases for latest()
Browse files Browse the repository at this point in the history
  • Loading branch information
chris48s committed Nov 4, 2024
1 parent 2cbd02e commit c9e7d3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions services/winget/version.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ describe('Winget Version helpers', function () {
})

test(latest, () => {
given(['1.2.3', '1.2.4', '2.0', '1.3.9.1']).expect('2.0')
given(['1.2.3', '1.2.4', '2.0-beta', '1.3-alpha']).expect('2.0-beta')

// compareVersion('3.1.1.0', '3.1.1') == 0, so It's free to choose any of them.
// I don't know why but it looks winget registry uses last newest version.
given(['3.1.1.0', '3.1.1']).expect('3.1.1')
Expand Down

0 comments on commit c9e7d3a

Please sign in to comment.