Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

orchestration.test.ts

23 lines789 Bytes

1import { OrchestrationDispatchCommandError } from "@t3tools/contracts";
2import { describe, expect, it } from "vite-plus/test";
3​
4import { wasBootstrapThreadDeleted } from "./orchestration.ts";
5​
6describe("wasBootstrapThreadDeleted", () => {
7 it("accepts only a confirmed deleted bootstrap thread", () => {
8 expect(
9 wasBootstrapThreadDeleted(
10 new OrchestrationDispatchCommandError({
11 message: "Failed to create worktree.",
12 bootstrapThreadDisposition: "deleted",
13 }),
14 ),
15 ).toBe(true);
16 expect(
17 wasBootstrapThreadDeleted(
18 new OrchestrationDispatchCommandError({ message: "Failed to create worktree." }),
19 ),
20 ).toBe(false);
21 expect(wasBootstrapThreadDeleted(new Error("connection lost"))).toBe(false);
22 });
23});