diff --git a/src/__tests__/perf/plugin-init-team-mode-resume-defer.test.ts b/src/__tests__/perf/plugin-init-team-mode-resume-defer.test.ts index 8f5d490a4..646bbab37 100644 --- a/src/__tests__/perf/plugin-init-team-mode-resume-defer.test.ts +++ b/src/__tests__/perf/plugin-init-team-mode-resume-defer.test.ts @@ -16,11 +16,11 @@ function makeHangingClient(): { hangCount.value += 1 return new Promise(() => {}) } - const client = { + const client = testCoerce({ session: { get: sessionGet, }, - } as unknown as PluginInput["client"] + }) return { hangCount, client } } diff --git a/tests/hashline/test-edge-cases.ts b/tests/hashline/test-edge-cases.ts index b00b0302d..4bf254908 100644 --- a/tests/hashline/test-edge-cases.ts +++ b/tests/hashline/test-edge-cases.ts @@ -459,7 +459,6 @@ const TEST_CASES: TestCase[] = [ "Expected line 2 to be exactly 180 characters.", ].join(" "), validate: (content) => { - const expected = "L".repeat(180); const lines = content.replace(/\r/g, "").trimEnd().split("\n"); if (!lines[1]) { return { passed: false, reason: "line 2 is missing" }; @@ -976,12 +975,12 @@ async function runTestCase( } } - const toolCalls = events.filter( + const toolCalls = testCoerce(events.filter( (e) => e.type === "tool_call" - ) as unknown as ToolCallEvent[]; - const toolResults = events.filter( + )); + const toolResults = testCoerce(events.filter( (e) => e.type === "tool_result" - ) as unknown as ToolResultEvent[]; + )); const editCalls = toolCalls.filter((e) => e.tool_name === "edit_file"); const editCallIds = new Set(editCalls.map((e) => e.tool_call_id)); diff --git a/tests/hashline/test-edit-ops.ts b/tests/hashline/test-edit-ops.ts index 05d63b4d2..599dc4851 100644 --- a/tests/hashline/test-edit-ops.ts +++ b/tests/hashline/test-edit-ops.ts @@ -45,7 +45,6 @@ const RESET = "\x1b[0m"; const pass = (msg: string) => console.log(` ${GREEN}✓${RESET} ${msg}`); const fail = (msg: string) => console.log(` ${RED}✗${RESET} ${msg}`); const info = (msg: string) => console.log(` ${DIM}${msg}${RESET}`); -const warn = (msg: string) => console.log(` ${YELLOW}⚠${RESET} ${msg}`); // ── Test case definition ───────────────────────────────────── interface TestCase { @@ -669,12 +668,12 @@ async function runTestCase( } } - const toolCalls = events.filter( + const toolCalls = testCoerce(events.filter( (e) => e.type === "tool_call" - ) as unknown as ToolCallEvent[]; - const toolResults = events.filter( + )); + const toolResults = testCoerce(events.filter( (e) => e.type === "tool_result" - ) as unknown as ToolResultEvent[]; + )); const editCalls = toolCalls.filter((e) => e.tool_name === "edit_file"); const editCallIds = new Set(editCalls.map((e) => e.tool_call_id));