Open History to see the last commit
1import { describe, expect, it } from "vite-plus/test";
2
3import { resolveThreadSyncPhase } from "./threadSync";
4
5describe("resolveThreadSyncPhase", () => {
6 it("reports a failed sync instead of syncing over cached messages", () => {
7 expect(
8 resolveThreadSyncPhase({
9 detailExists: true,
10 shellExists: true,
11 status: "cached",
12 hasError: true,
13 }),
14 ).toBe("failed");
15 expect(
16 resolveThreadSyncPhase({
17 detailExists: false,
18 shellExists: true,
19 status: "synchronizing",
20 hasError: true,
21 }),
22 ).toBe("loading");
23 expect(
24 resolveThreadSyncPhase({
25 detailExists: true,
26 shellExists: true,
27 status: "synchronizing",
28 hasError: false,
29 }),
30 ).toBe("syncing");
31 });
32});