-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow excluding pre-release versions
- Loading branch information
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { describe, expect, it } from "bun:test"; | ||
import { getAllVersions } from "../../src"; | ||
|
||
describe("versions", () => { | ||
it("does not return pre-release versions when specified", async () => { | ||
const versions = await getAllVersions(false); | ||
|
||
expect(versions).not.toContain("1.8.4-nightly.a579bf7"); | ||
}); | ||
|
||
it("returns pre-release versions when specified", async () => { | ||
const versions = await getAllVersions(true); | ||
|
||
expect(versions).toContain("1.8.4-nightly.a579bf7"); | ||
}); | ||
}); |