import { expect, test } from "bun:test"; import { isVersionsGeq1585, updateGlobalVersions, } from "../src/commands/sync/global.ts"; // A server gives the bare edition to a token that cannot authenticate on /api/version; read as // an old server, `sync push` would rewrite every app's runnables to their legacy type names. test("an edition-only version reads as a current server", () => { updateGlobalVersions("EE v1.500.0"); expect(isVersionsGeq1585()).toBe(false); updateGlobalVersions("EE"); expect(isVersionsGeq1585()).toBe(true); updateGlobalVersions("CE v1.895.1"); expect(isVersionsGeq1585()).toBe(true); });