From e475f5cabff005f376a38b4b4f53fcb11e087334 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 6 Apr 2026 15:38:32 +0100 Subject: [PATCH] chore(llm-task): drop dead test lint comments --- extensions/llm-task/src/llm-task-tool.test.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/extensions/llm-task/src/llm-task-tool.test.ts b/extensions/llm-task/src/llm-task-tool.test.ts index 59df7ad74ff..c2b9d14542f 100644 --- a/extensions/llm-task/src/llm-task-tool.test.ts +++ b/extensions/llm-task/src/llm-task-tool.test.ts @@ -52,7 +52,6 @@ const runEmbeddedPiAgent = vi.fn(async () => ({ payloads: [{ text: "{}" }], })); -// oxlint-disable-next-line typescript/no-explicit-any function fakeApi(overrides: any = {}) { return { id: "llm-task", @@ -75,7 +74,6 @@ function fakeApi(overrides: any = {}) { } function mockEmbeddedRunJson(payload: unknown) { - // oxlint-disable-next-line typescript/no-explicit-any (runEmbeddedPiAgent as any).mockResolvedValueOnce({ meta: {}, payloads: [{ text: JSON.stringify(payload) }], @@ -85,7 +83,6 @@ function mockEmbeddedRunJson(payload: unknown) { async function executeEmbeddedRun(input: Record) { const tool = createLlmTaskTool(fakeApi()); await tool.execute("id", input); - // oxlint-disable-next-line typescript/no-explicit-any return (runEmbeddedPiAgent as any).mock.calls[0]?.[0]; } @@ -93,31 +90,26 @@ describe("llm-task tool (json-only)", () => { beforeEach(() => vi.clearAllMocks()); it("returns parsed json", async () => { - // oxlint-disable-next-line typescript/no-explicit-any (runEmbeddedPiAgent as any).mockResolvedValueOnce({ meta: {}, payloads: [{ text: JSON.stringify({ foo: "bar" }) }], }); const tool = createLlmTaskTool(fakeApi()); const res = await tool.execute("id", { prompt: "return foo" }); - // oxlint-disable-next-line typescript/no-explicit-any expect((res as any).details.json).toEqual({ foo: "bar" }); }); it("strips fenced json", async () => { - // oxlint-disable-next-line typescript/no-explicit-any (runEmbeddedPiAgent as any).mockResolvedValueOnce({ meta: {}, payloads: [{ text: '```json\n{"ok":true}\n```' }], }); const tool = createLlmTaskTool(fakeApi()); const res = await tool.execute("id", { prompt: "return ok" }); - // oxlint-disable-next-line typescript/no-explicit-any expect((res as any).details.json).toEqual({ ok: true }); }); it("validates schema", async () => { - // oxlint-disable-next-line typescript/no-explicit-any (runEmbeddedPiAgent as any).mockResolvedValueOnce({ meta: {}, payloads: [{ text: JSON.stringify({ foo: "bar" }) }], @@ -130,12 +122,10 @@ describe("llm-task tool (json-only)", () => { additionalProperties: false, }; const res = await tool.execute("id", { prompt: "return foo", schema }); - // oxlint-disable-next-line typescript/no-explicit-any expect((res as any).details.json).toEqual({ foo: "bar" }); }); it("throws on invalid json", async () => { - // oxlint-disable-next-line typescript/no-explicit-any (runEmbeddedPiAgent as any).mockResolvedValueOnce({ meta: {}, payloads: [{ text: "not-json" }], @@ -145,7 +135,6 @@ describe("llm-task tool (json-only)", () => { }); it("throws on schema mismatch", async () => { - // oxlint-disable-next-line typescript/no-explicit-any (runEmbeddedPiAgent as any).mockResolvedValueOnce({ meta: {}, payloads: [{ text: JSON.stringify({ foo: 1 }) }],