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, 03:37 UTC
| 1 | import { assert, it } from "@effect/vitest"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import * as Schema from "effect/Schema"; |
| 4 | |
| 5 | import { ThreadPullRequestLink } from "./threadPullRequest.ts"; |
| 6 | |
| 7 | const decodeLinks = Schema.decodeUnknownEffect(Schema.Array(ThreadPullRequestLink)); |
| 8 | |
| 9 | it.effect("decodes a watch saved before passed checks were recorded", () => |
| 10 | Effect.gen(function* () { |
| 11 | const [link] = yield* decodeLinks([ |
| 12 | { |
| 13 | host: "github.com", |
| 14 | repository: "pingdotgg/t3code", |
| 15 | number: 42, |
| 16 | url: "https://github.com/pingdotgg/t3code/pull/42", |
| 17 | source: "agent", |
| 18 | linkedAt: "2026-01-01T00:00:00.000Z", |
| 19 | snapshot: null, |
| 20 | stack: null, |
| 21 | watch: { |
| 22 | startedAt: "2026-01-01T00:00:00.000Z", |
| 23 | headSha: "abc123", |
| 24 | failedChecks: [], |
| 25 | passed: true, |
| 26 | remarksThrough: "2026-01-01T00:00:00.000Z", |
| 27 | remarkIds: [], |
| 28 | conflicting: false, |
| 29 | wakes: 0, |
| 30 | }, |
| 31 | }, |
| 32 | ]); |
| 33 | |
| 34 | assert.deepStrictEqual(link?.watch?.passedChecks, []); |
| 35 | }), |
| 36 | ); |