Skip to content

Commit

Permalink
Closes pkgxdev#118
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Dec 6, 2022
1 parent 255d730 commit 0f2373a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/unit/semver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ Deno.test("semver", async test => {

const e = new semver.Range("~1")
assertEquals(e.toString(), "^1") // indeed: we change the ~ to ^

const f = new semver.Range("^14||^16||^18")
assert(f.satisfies(new SemVer("14.0.0")))
assertFalse(f.satisfies(new SemVer("15.0.0")))
assert(f.satisfies(new SemVer("16.0.0")))
assertFalse(f.satisfies(new SemVer("17.0.0")))
assert(f.satisfies(new SemVer("18.0.0")))
})

await test.step("intersection", async test => {
Expand Down

0 comments on commit 0f2373a

Please sign in to comment.