Files
paseo/packages/app/native-release-version.test.ts
T
Mohamed Boudra d191fa6685 feat(app): automate iOS beta distribution
Beta tags now reach external testers without per-release dashboard work. Reserve distinct native build slots so successive betas and the promoted stable build can coexist under one app version.
2026-08-04 19:21:22 +02:00

28 lines
865 B
TypeScript

import { describe, expect, it } from "vitest";
const { getNativeReleaseVersion } = require("./native-release-version");
describe("native release version", () => {
it("reserves the final iOS build slot for a stable release", () => {
expect(getNativeReleaseVersion("0.2.6")).toEqual({
appVersion: "0.2.6",
androidVersionCode: 2006,
iosBuildNumber: "2006999",
});
});
it("gives each beta a unique iOS build slot under the stable app version", () => {
expect(getNativeReleaseVersion("0.2.6-beta.2")).toEqual({
appVersion: "0.2.6",
androidVersionCode: 2006,
iosBuildNumber: "2006002",
});
});
it("rejects beta numbers that consume the stable iOS build slot", () => {
expect(() => getNativeReleaseVersion("0.2.6-beta.999")).toThrow(
"iOS beta number must be between 1 and 998",
);
});
});