From 0ccf434f0c2c12a4ce35abf4af5bf0f90bcffc29 Mon Sep 17 00:00:00 2001 From: Xiangzhe Date: Fri, 21 Aug 2026 13:28:11 -0300 Subject: [PATCH] chore(test): type security test bodies, drop unused eslint-disable Keeps the new security regression tests within the tests/ no-explicit-any budget and removes an unused eslint-disable directive flagged by the linter. --- tests/unit/acp-agents-route.test.ts | 4 ++-- tests/unit/authz/proxy-matcher-case.test.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/unit/acp-agents-route.test.ts b/tests/unit/acp-agents-route.test.ts index ab2e118dc8..2d3065a9a8 100644 --- a/tests/unit/acp-agents-route.test.ts +++ b/tests/unit/acp-agents-route.test.ts @@ -124,8 +124,8 @@ test("POST /api/acp/agents rejects an interpreter eval payload (GHSA-jphr-2gw7-x token ) ); - const body = (await response.json()) as any; + const body = (await response.json()) as { error?: string }; assert.equal(response.status, 400); - assert.match(body.error, /Invalid versionCommand/i); + assert.match(body.error ?? "", /Invalid versionCommand/i); }); diff --git a/tests/unit/authz/proxy-matcher-case.test.ts b/tests/unit/authz/proxy-matcher-case.test.ts index 67c040486c..4069fd9b68 100644 --- a/tests/unit/authz/proxy-matcher-case.test.ts +++ b/tests/unit/authz/proxy-matcher-case.test.ts @@ -1,6 +1,5 @@ import { test } from "node:test"; import assert from "node:assert/strict"; -// eslint-disable-next-line @typescript-eslint/no-require-imports import { createRequire } from "node:module"; import { config } from "../../../src/proxy.ts";