The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | import { viewedOverlay } from "./pullRequestFilesViewed"; |
| 3 | |
| 4 | describe("viewedOverlay", () => { |
| 5 | it("keeps a press while its write is in flight", () => { |
| 6 | expect( |
| 7 | viewedOverlay({ "a.ts": { viewed: true, version: 1, awaitingReadAfter: undefined } }, 3), |
| 8 | ).toEqual({ "a.ts": true }); |
| 9 | }); |
| 10 | |
| 11 | it("yields a landed press to the next completed read, even one with unchanged data", () => { |
| 12 | const presses = { "a.ts": { viewed: true, version: 1, awaitingReadAfter: 3 } }; |
| 13 | expect(viewedOverlay(presses, 3)).toEqual({ "a.ts": true }); |
| 14 | expect(viewedOverlay(presses, 4)).toEqual({}); |
| 15 | }); |
| 16 | }); |