Open History to see the last commit
1import { expect, it } from "@effect/vitest";
2
3import { runServicePreflight } from "./servicePreflight.ts";
4import { SERVICE_LAUNCHER_PROTOCOL } from "./serviceProtocol.ts";
5
6it("requires the database-snapshot launcher protocol", () => {
7 expect(
8 runServicePreflight({
9 databasePath: "/missing/state.sqlite",
10 launcherProtocol: SERVICE_LAUNCHER_PROTOCOL - 1,
11 version: "1.2.3",
12 }),
13 ).toMatchObject({ status: "blocked", version: "1.2.3" });
14
15 expect(
16 runServicePreflight({
17 databasePath: "/missing/state.sqlite",
18 launcherProtocol: SERVICE_LAUNCHER_PROTOCOL,
19 version: "1.2.3",
20 }),
21 ).toEqual({
22 status: "ready",
23 version: "1.2.3",
24 launcherProtocol: SERVICE_LAUNCHER_PROTOCOL,
25 });
26});