test(hashline): 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:13 +09:00
parent fb135d047c
commit 2fc1786077
3 changed files with 10 additions and 12 deletions
@@ -16,11 +16,11 @@ function makeHangingClient(): {
hangCount.value += 1
return new Promise<never>(() => {})
}
const client = {
const client = testCoerce<PluginInput["client"]>({
session: {
get: sessionGet,
},
} as unknown as PluginInput["client"]
})
return { hangCount, client }
}
+4 -5
View File
@@ -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<ToolCallEvent[]>(events.filter(
(e) => e.type === "tool_call"
) as unknown as ToolCallEvent[];
const toolResults = events.filter(
));
const toolResults = testCoerce<ToolResultEvent[]>(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));
+4 -5
View File
@@ -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<ToolCallEvent[]>(events.filter(
(e) => e.type === "tool_call"
) as unknown as ToolCallEvent[];
const toolResults = events.filter(
));
const toolResults = testCoerce<ToolResultEvent[]>(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));