fix(tests): drop three needless as any casts on the volcengine testing surface (base-red #12732)

`release/v3.8.51` is red on `ESLint errors: 3 error(s)`:

  tests/unit/volcengine-plan-binding-upsert.test.ts:70,96,120
  error @typescript-eslint/no-explicit-any — Unexpected any.

The violations are not new. #12795 regenerated
`config/quality/eslint-suppressions.json` and pruned the entry that had
these three frozen (0 additions, 5 deletions on that file), so a rule that
is `error` in `tests/` since #6218 started failing the whole-repo lint on
code the PR never touched.

The casts were unnecessary to begin with: `__testing` exports
`upsertConnection` directly (`src/lib/providers/volcenginePlanBinding.ts:380-383`)
and it is a normally typed exported function, so `bindingTesting.upsertConnection(...)`
resolves without help. Removing `as any` both clears the errors and puts
the three call sites under type checking instead of opting them out —
strictly better than restoring the suppression.

Validated: eslint on the file exits 1 with all three errors before and 0
after; `typecheck:core` 0 errors; the file's own suite passes 3/3.
This commit is contained in:
diegosouzapw
2026-09-10 11:49:52 -03:00
parent 81bf3cc36e
commit a7b66d5a81

View File

@@ -67,7 +67,7 @@ test("volcenginePlanBinding upsert rules with SQLite temp isolation", async (t)
providerSpecificData: { autoFetchModels: true, customTag: "keep-me" },
});
const updated1 = await (bindingTesting as any).upsertConnection(
const updated1 = await bindingTesting.upsertConnection(
"coding",
"ark-new-key-1",
"new-cookie-1",
@@ -93,7 +93,7 @@ test("volcenginePlanBinding upsert rules with SQLite temp isolation", async (t)
providerSpecificData: {},
});
const createdNew = await (bindingTesting as any).upsertConnection(
const createdNew = await bindingTesting.upsertConnection(
"coding",
"ark-brand-new-key-3",
"new-cookie-3",
@@ -117,7 +117,7 @@ test("volcenginePlanBinding upsert rules with SQLite temp isolation", async (t)
});
// Passing conn1.id (which is coding-plan) into agent upsert must NOT match conn1
const agentUpsertResult = await (bindingTesting as any).upsertConnection(
const agentUpsertResult = await bindingTesting.upsertConnection(
"agent",
"ark-agent-new-key",
"agent-cookie",