test(tools): remove unsafe test assertions

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-12 14:23:05 +09:00
parent 8b093a1115
commit fb135d047c
24 changed files with 199 additions and 156 deletions
@@ -51,9 +51,9 @@ describe("normalizeHashlineEdits", () => {
it("rejects legacy payload without op", () => {
//#given
const input = [{ type: "set_line", line: "2#VK", text: "updated" }] as unknown as Parameters<
const input = testCoerce<Parameters<
typeof normalizeHashlineEdits
>[0]
>[0]>([{ type: "set_line", line: "2#VK", text: "updated" }])
//#when / #then
expect(() => normalizeHashlineEdits(input)).toThrow(/legacy format was removed/i)
+2 -2
View File
@@ -8,14 +8,14 @@ import * as os from "node:os"
import * as path from "node:path"
function createMockContext(): ToolContext {
return {
return testCoerce<ToolContext>({
sessionID: "test",
messageID: "test",
agent: "test",
abort: new AbortController().signal,
metadata: mock(() => {}),
ask: async () => {},
} as unknown as ToolContext
})
}
describe("createHashlineEditTool", () => {