Files
Recordly/electron/updateChannel.test.ts
2026-09-01 16:33:20 +10:00

27 lines
863 B
TypeScript

import { describe, expect, it } from "vitest";
import { EXPERIMENTAL_UPDATE_DESCRIPTION, getUpdateChannelConfiguration } from "./updateChannel";
describe("getUpdateChannelConfiguration", () => {
it("keeps regular clients on stable metadata", () => {
expect(getUpdateChannelConfiguration(false)).toEqual({
channel: "latest",
allowPrerelease: false,
allowDowngrade: false,
});
});
it("uses beta metadata only after the client opts in", () => {
expect(getUpdateChannelConfiguration(true)).toEqual({
channel: "beta",
allowPrerelease: true,
allowDowngrade: false,
});
});
it("uses the approved experimental update description", () => {
expect(EXPERIMENTAL_UPDATE_DESCRIPTION).toBe(
"You've opted into experimental updates so you have the choice to test the latest update of Recordly before it's widely available.",
);
});
});