We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2358b25 commit 577ae37Copy full SHA for 577ae37
src/version/helper.test.ts
@@ -63,4 +63,20 @@ describe("getLatestVersion", () => {
63
`No ${ReleaseChannel.Stable} versions found`,
64
);
65
});
66
+
67
+ it("should throw if no beta version found", async () => {
68
+ const mockResponse = {
69
+ CLI2: {
70
+ release: { version: "2.32.0" },
71
+ },
72
+ };
73
74
+ jest.spyOn(global, "fetch").mockResolvedValueOnce({
75
+ json: async () => mockResponse,
76
+ } as Response);
77
78
+ await expect(getLatestVersion(ReleaseChannel.Beta)).rejects.toThrow(
79
+ `No ${ReleaseChannel.Beta} versions found`,
80
+ );
81
+ });
82
0 commit comments