From 7d5cfd157ab3ffa3d73124bb41daf93e9bd3cbbd Mon Sep 17 00:00:00 2001 From: Shakker Date: Sat, 9 May 2026 05:36:04 +0100 Subject: [PATCH] test: tighten infra sdk empty array assertions --- src/infra/diagnostic-events.test.ts | 8 +++--- src/infra/diagnostic-flags.test.ts | 2 +- src/infra/exec-approvals-allow-always.test.ts | 26 +++++++++---------- src/infra/exec-approvals-store.test.ts | 10 +++---- src/infra/exec-approvals.test.ts | 6 ++--- src/infra/fetch.test.ts | 4 +-- src/infra/kysely-node-sqlite.test.ts | 2 +- src/infra/net/runtime-fetch.test.ts | 2 +- .../session-delivery-queue.recovery.test.ts | 2 +- src/infra/ssh-config.test.ts | 2 +- src/infra/state-migrations.fs.test.ts | 2 +- src/infra/system-run-command.test.ts | 2 +- src/infra/update-runner.test.ts | 10 +++---- .../approval-native-helpers.test.ts | 2 +- src/plugin-sdk/channel-policy.test.ts | 6 ++--- src/plugin-sdk/channel-streaming.test.ts | 2 +- src/plugin-sdk/command-auth.test.ts | 2 +- src/plugin-sdk/direct-dm.test.ts | 2 +- src/plugin-sdk/facade-loader.test.ts | 2 +- src/plugin-sdk/facade-runtime.test.ts | 4 +-- src/plugin-sdk/fetch-auth.test.ts | 4 ++- src/plugin-sdk/provider-model-shared.test.ts | 2 +- src/plugin-sdk/provider-tools.test.ts | 8 +++--- .../provider-web-search-contract.test.ts | 2 +- ...ema-normalization-runtime-contract.test.ts | 2 +- 25 files changed, 59 insertions(+), 57 deletions(-) diff --git a/src/infra/diagnostic-events.test.ts b/src/infra/diagnostic-events.test.ts index 954c0fa06dc..04d94c69bb7 100644 --- a/src/infra/diagnostic-events.test.ts +++ b/src/infra/diagnostic-events.test.ts @@ -272,7 +272,7 @@ describe("diagnostic-events", () => { }); await new Promise((resolve) => setImmediate(resolve)); - expect(publicEvents).toEqual([]); + expect(publicEvents).toStrictEqual([]); expect(internalEvents).toEqual([{ trusted: true, type: "model.call.started" }]); }); @@ -395,7 +395,7 @@ describe("diagnostic-events", () => { model: "gpt-5.4", }); - expect(events).toEqual([]); + expect(events).toStrictEqual([]); await new Promise((resolve) => setImmediate(resolve)); expect(events).toEqual(["tool.execution.started", "model.call.started"]); }); @@ -417,7 +417,7 @@ describe("diagnostic-events", () => { }); await new Promise((resolve) => setImmediate(resolve)); - expect(publicEvents).toEqual([]); + expect(publicEvents).toStrictEqual([]); expect(internalEvents).toEqual(["log.record"]); }); @@ -434,7 +434,7 @@ describe("diagnostic-events", () => { channel: "telegram", }); - expect(seen).toEqual([]); + expect(seen).toStrictEqual([]); expect(nowSpy).not.toHaveBeenCalled(); }); diff --git a/src/infra/diagnostic-flags.test.ts b/src/infra/diagnostic-flags.test.ts index 868b4c56c2f..69a59095bd4 100644 --- a/src/infra/diagnostic-flags.test.ts +++ b/src/infra/diagnostic-flags.test.ts @@ -40,7 +40,7 @@ describe("resolveDiagnosticFlags", () => { resolveDiagnosticFlags(cfg, { OPENCLAW_DIAGNOSTICS: raw, } as NodeJS.ProcessEnv), - ).toEqual([]); + ).toStrictEqual([]); } }); }); diff --git a/src/infra/exec-approvals-allow-always.test.ts b/src/infra/exec-approvals-allow-always.test.ts index 644c7dc302e..ca2f02af185 100644 --- a/src/infra/exec-approvals-allow-always.test.ts +++ b/src/infra/exec-approvals-allow-always.test.ts @@ -135,7 +135,7 @@ describe("resolveAllowAlwaysPatterns", () => { env, safeBins, }); - expect(persisted).toEqual([]); + expect(persisted).toStrictEqual([]); const second = evaluateShellAllowlist({ command, @@ -168,7 +168,7 @@ describe("resolveAllowAlwaysPatterns", () => { if (params.expectPersisted) { expect(persisted).toEqual([touch]); } else { - expect(persisted).toEqual([]); + expect(persisted).toStrictEqual([]); } const second = evaluateShellAllowlist({ @@ -219,7 +219,7 @@ describe("resolveAllowAlwaysPatterns", () => { }, ], }); - expect(patterns).toEqual([]); + expect(patterns).toStrictEqual([]); }); it("persists benign awk interpreters when strict inline-eval is enabled", () => { @@ -312,7 +312,7 @@ describe("resolveAllowAlwaysPatterns", () => { safeBins, strictInlineEval: true, }); - expect(persisted).toEqual([]); + expect(persisted).toStrictEqual([]); }); it("unwraps shell wrappers and persists the inner executable instead", () => { @@ -460,7 +460,7 @@ describe("resolveAllowAlwaysPatterns", () => { env, safeBins, }); - expect(persisted).toEqual([]); + expect(persisted).toStrictEqual([]); const second = evaluateShellAllowlist({ command, @@ -589,7 +589,7 @@ $0 \\"$1\\"" touch {marker}`, ], platform: process.platform, }); - expect(patterns).toEqual([]); + expect(patterns).toStrictEqual([]); }); it("detects shell wrappers even when unresolved executableName is a full path", () => { @@ -730,7 +730,7 @@ $0 \\"$1\\"" touch {marker}`, env: makePathEnv(dir), platform: process.platform, }); - expect(patterns).toEqual([]); + expect(patterns).toStrictEqual([]); }); it("fails closed for unresolved dispatch wrappers", () => { @@ -750,7 +750,7 @@ $0 \\"$1\\"" touch {marker}`, ], platform: process.platform, }); - expect(patterns).toEqual([]); + expect(patterns).toStrictEqual([]); }); it("prevents allow-always bypass for busybox shell applets", () => { @@ -879,7 +879,7 @@ $0 \\"$1\\"" touch {marker}`, env, safeBins, }); - expect(persisted).toEqual([]); + expect(persisted).toStrictEqual([]); const second = evaluateShellAllowlist({ command: `awk 'BEGIN{system("id > ${path.join(dir, "marker")}")}'`, @@ -915,7 +915,7 @@ $0 \\"$1\\"" touch {marker}`, env, safeBins, }); - expect(persisted).toEqual([]); + expect(persisted).toStrictEqual([]); const second = evaluateShellAllowlist({ command: `sh -c '$0 "$@"' awk 'BEGIN{system("id > /tmp/pwned")}'`, @@ -977,7 +977,7 @@ $0 \\"$1\\"" touch {marker}`, env, safeBins, }); - expect(persisted).toEqual([]); + expect(persisted).toStrictEqual([]); const second = evaluateShellAllowlist({ command: `sh -c '$0 "$@"' env BASH_ENV=/tmp/payload.sh bash -c 'id > /tmp/pwned'`, @@ -1005,7 +1005,7 @@ $0 \\"$1\\"" touch {marker}`, env, safeBins, }); - expect(persisted).toEqual([]); + expect(persisted).toStrictEqual([]); const second = evaluateShellAllowlist({ command: `sh -c '$0 "$@"' bash -c 'id > /tmp/pwned'`, @@ -1033,7 +1033,7 @@ $0 \\"$1\\"" touch {marker}`, env, safeBins, }); - expect(persisted).toEqual([]); + expect(persisted).toStrictEqual([]); const second = evaluateShellAllowlist({ command: `sh -c '$0 "$@"' xargs sh -c 'id > /tmp/pwned'`, diff --git a/src/infra/exec-approvals-store.test.ts b/src/infra/exec-approvals-store.test.ts index 933325800f5..73d7c5ca504 100644 --- a/src/infra/exec-approvals-store.test.ts +++ b/src/infra/exec-approvals-store.test.ts @@ -234,7 +234,7 @@ describe("exec approvals store helpers", () => { expect(rename).toHaveBeenCalled(); expect(fs.readFileSync(approvalsPath, "utf8")).toContain('"security": "full"'); expect(fs.statSync(approvalsPath).mode & 0o777).toBe(0o600); - expect(listExecApprovalTempFiles(dir)).toEqual([]); + expect(listExecApprovalTempFiles(dir)).toStrictEqual([]); }); it("normalizes fallback temp files before copying", () => { @@ -268,7 +268,7 @@ describe("exec approvals store helpers", () => { expect(fs.readFileSync(approvalsPath, "utf8")).toContain('"security": "full"'); expect(fs.statSync(approvalsPath).mode & 0o777).toBe(0o600); - expect(listExecApprovalTempFiles(dir)).toEqual([]); + expect(listExecApprovalTempFiles(dir)).toStrictEqual([]); }); it("restores the previous approvals file when fallback copy fails", () => { @@ -304,7 +304,7 @@ describe("exec approvals store helpers", () => { ).toThrow(/copy failed after opening destination/); expect(fs.readFileSync(approvalsPath, "utf8")).toBe(previousRaw); expect(fs.statSync(approvalsPath).mode & 0o777).toBe(0o600); - expect(listExecApprovalTempFiles(dir)).toEqual([]); + expect(listExecApprovalTempFiles(dir)).toStrictEqual([]); }); it("does not follow a symlink swapped in before fallback copy", () => { @@ -338,7 +338,7 @@ describe("exec approvals store helpers", () => { saveExecApprovals({ version: 1, defaults: { security: "full" }, agents: {} }), ).toThrow(/symlink|ELOOP/); expect(fs.readFileSync(targetPath, "utf8")).toBe('{"sentinel":true}\n'); - expect(listExecApprovalTempFiles(dir)).toEqual([]); + expect(listExecApprovalTempFiles(dir)).toStrictEqual([]); }); it("does not use the copy fallback for hard-linked approvals files", () => { @@ -361,7 +361,7 @@ describe("exec approvals store helpers", () => { saveExecApprovals({ version: 1, defaults: { security: "full" }, agents: {} }), ).toThrow(/hard-linked exec approvals file/); expect(fs.readFileSync(linkedPath, "utf8")).toBe('{"sentinel":true}\n'); - expect(listExecApprovalTempFiles(dir)).toEqual([]); + expect(listExecApprovalTempFiles(dir)).toStrictEqual([]); }); it("refuses to write approvals through a symlink destination", () => { diff --git a/src/infra/exec-approvals.test.ts b/src/infra/exec-approvals.test.ts index c98a337b966..f9ddbc3f14c 100644 --- a/src/infra/exec-approvals.test.ts +++ b/src/infra/exec-approvals.test.ts @@ -90,7 +90,7 @@ describe("exec approvals allowlist evaluation", () => { return; } expect(result.allowlistSatisfied).toBe(true); - expect(result.allowlistMatches).toEqual([]); + expect(result.allowlistMatches).toStrictEqual([]); }); it("satisfies allowlist via auto-allow skills", () => { @@ -188,8 +188,8 @@ describe("exec approvals allowlist evaluation", () => { cwd: "/tmp", }); expect(result.allowlistSatisfied).toBe(false); - expect(result.allowlistMatches).toEqual([]); - expect(result.segmentSatisfiedBy).toEqual([]); + expect(result.allowlistMatches).toStrictEqual([]); + expect(result.segmentSatisfiedBy).toStrictEqual([]); }); it("aggregates segment satisfaction across chains", () => { diff --git a/src/infra/fetch.test.ts b/src/infra/fetch.test.ts index 0d8b86195d4..8db28094e47 100644 --- a/src/infra/fetch.test.ts +++ b/src/infra/fetch.test.ts @@ -146,7 +146,7 @@ describe("wrapFetchWithAbortSignal", () => { await Promise.resolve(); await waitForMicrotaskTurn(); - expect(unhandled).toEqual([]); + expect(unhandled).toStrictEqual([]); expect(removeEventListener).toHaveBeenCalledOnce(); } finally { process.off("unhandledRejection", onUnhandled); @@ -303,7 +303,7 @@ describe("wrapFetchWithAbortSignal", () => { const seenHeaders = getSeenInit()?.headers; expect(seenHeaders).not.toBe(init.headers); - expect(Object.getOwnPropertySymbols(seenHeaders as object)).toEqual([]); + expect(Object.getOwnPropertySymbols(seenHeaders as object)).toStrictEqual([]); expect(new Headers(seenHeaders).get("content-type")).toBe("application/json"); expect(Object.getOwnPropertySymbols(init.headers as object)).toHaveLength(1); }, diff --git a/src/infra/kysely-node-sqlite.test.ts b/src/infra/kysely-node-sqlite.test.ts index 171ed317e25..1e31959667f 100644 --- a/src/infra/kysely-node-sqlite.test.ts +++ b/src/infra/kysely-node-sqlite.test.ts @@ -115,7 +115,7 @@ describe("NodeSqliteKyselyDialect", () => { throw new Error("rollback outer"); }), ).rejects.toThrow("rollback outer"); - await expect(db.selectFrom("person").selectAll().execute()).resolves.toEqual([]); + await expect(db.selectFrom("person").selectAll().execute()).resolves.toStrictEqual([]); const trx = await db.startTransaction().execute(); await trx.insertInto("person").values({ name: "Ada" }).execute(); diff --git a/src/infra/net/runtime-fetch.test.ts b/src/infra/net/runtime-fetch.test.ts index 8790c5e2ccc..32e3fcfb889 100644 --- a/src/infra/net/runtime-fetch.test.ts +++ b/src/infra/net/runtime-fetch.test.ts @@ -84,7 +84,7 @@ describe("fetchWithRuntimeDispatcher", () => { expect(response.status).toBe(200); const sentHeaders = requireFetchInit(runtimeFetch).headers; expect(sentHeaders).not.toBe(headers); - expect(Object.getOwnPropertySymbols(sentHeaders as object)).toEqual([]); + expect(Object.getOwnPropertySymbols(sentHeaders as object)).toStrictEqual([]); expect(Object.getOwnPropertySymbols(headers)).toHaveLength(1); }); diff --git a/src/infra/session-delivery-queue.recovery.test.ts b/src/infra/session-delivery-queue.recovery.test.ts index f9ae94fd74c..c1347ac1cce 100644 --- a/src/infra/session-delivery-queue.recovery.test.ts +++ b/src/infra/session-delivery-queue.recovery.test.ts @@ -33,7 +33,7 @@ describe("session-delivery queue recovery", () => { expect(deliver).toHaveBeenCalledTimes(1); expect(summary.recovered).toBe(1); - expect(await loadPendingSessionDeliveries(tempDir)).toEqual([]); + expect(await loadPendingSessionDeliveries(tempDir)).toStrictEqual([]); }); }); diff --git a/src/infra/ssh-config.test.ts b/src/infra/ssh-config.test.ts index 80c83af330f..4798dcaaf64 100644 --- a/src/infra/ssh-config.test.ts +++ b/src/infra/ssh-config.test.ts @@ -80,7 +80,7 @@ describe("ssh-config", () => { expect(parsed.user).toBe("bob"); expect(parsed.host).toBe("example.com"); expect(parsed.port).toBeUndefined(); - expect(parsed.identityFiles).toEqual([]); + expect(parsed.identityFiles).toStrictEqual([]); }); it("resolves ssh config via ssh -G", async () => { diff --git a/src/infra/state-migrations.fs.test.ts b/src/infra/state-migrations.fs.test.ts index 3e4a54261cd..0fb27cf27e1 100644 --- a/src/infra/state-migrations.fs.test.ts +++ b/src/infra/state-migrations.fs.test.ts @@ -16,7 +16,7 @@ describe("state migration fs helpers", () => { await withTempDir({ prefix: "openclaw-state-migrations-fs-" }, async (base) => { const nested = path.join(base, "nested"); - expect(safeReadDir(nested)).toEqual([]); + expect(safeReadDir(nested)).toStrictEqual([]); ensureDir(nested); fs.writeFileSync(path.join(nested, "file.txt"), "ok", "utf8"); diff --git a/src/infra/system-run-command.test.ts b/src/infra/system-run-command.test.ts index ca43a4d2b54..4c4fc0cd339 100644 --- a/src/infra/system-run-command.test.ts +++ b/src/infra/system-run-command.test.ts @@ -258,7 +258,7 @@ describe("system run command helpers", () => { test("resolveSystemRunCommand returns an empty success payload when no command is provided", () => { const res = expectValidResult(resolveSystemRunCommand({})); - expect(res.argv).toEqual([]); + expect(res.argv).toStrictEqual([]); expect(res.commandText).toBe(""); expect(res.shellPayload).toBeNull(); expect(res.previewText).toBeNull(); diff --git a/src/infra/update-runner.test.ts b/src/infra/update-runner.test.ts index 0f3811828ab..fbca32e2fc9 100644 --- a/src/infra/update-runner.test.ts +++ b/src/infra/update-runner.test.ts @@ -345,7 +345,7 @@ describe("runGatewayUpdate", () => { expect(result.status).toBe("error"); expect(result.reason).toBe("fetch-failed"); expect(calls).toContain(fetchCommand); - expect(calls.slice(calls.indexOf(fetchCommand) + 1)).toEqual([]); + expect(calls.slice(calls.indexOf(fetchCommand) + 1)).toStrictEqual([]); }); it("aborts rebase on failure", async () => { @@ -1431,7 +1431,7 @@ describe("runGatewayUpdate", () => { expect(calls).not.toContain("npm run build"); expect(calls).not.toContain("npm run lint"); const preflightCalls = calls.filter((call) => preflightPrefixPattern.test(call)); - expect(preflightCalls).toEqual([]); + expect(preflightCalls).toStrictEqual([]); }); it("skips update when no git root", async () => { @@ -1453,8 +1453,8 @@ describe("runGatewayUpdate", () => { expect(result.reason).toBe("not-git-install"); const pnpmGlobalInstallCalls = calls.filter((call) => call.startsWith("pnpm add -g")); const npmGlobalInstallCalls = calls.filter((call) => call.startsWith("npm i -g")); - expect(pnpmGlobalInstallCalls).toEqual([]); - expect(npmGlobalInstallCalls).toEqual([]); + expect(pnpmGlobalInstallCalls).toStrictEqual([]); + expect(npmGlobalInstallCalls).toStrictEqual([]); }); async function runNpmGlobalUpdateCase(params: { @@ -1908,7 +1908,7 @@ describe("runGatewayUpdate", () => { ); const pnpmAddGlobalCalls = calls.filter((call) => call.startsWith("pnpm add -g")); expect(npmPrefixedGlobalInstallCalls.length).toBeGreaterThan(0); - expect(pnpmAddGlobalCalls).toEqual([]); + expect(pnpmAddGlobalCalls).toStrictEqual([]); expect(result.steps.map((step) => step.name)).toEqual(["global update", "global install swap"]); await expect(fs.access(staleInstallChunk)).rejects.toMatchObject({ code: "ENOENT" }); }); diff --git a/src/plugin-sdk/approval-native-helpers.test.ts b/src/plugin-sdk/approval-native-helpers.test.ts index 93346c4c931..5fa486998c5 100644 --- a/src/plugin-sdk/approval-native-helpers.test.ts +++ b/src/plugin-sdk/approval-native-helpers.test.ts @@ -268,6 +268,6 @@ describe("createChannelApproverDmTargetResolver", () => { expiresAtMs: 1000, }, }), - ).toEqual([]); + ).toStrictEqual([]); }); }); diff --git a/src/plugin-sdk/channel-policy.test.ts b/src/plugin-sdk/channel-policy.test.ts index ad83c6ad47d..64311e28bd0 100644 --- a/src/plugin-sdk/channel-policy.test.ts +++ b/src/plugin-sdk/channel-policy.test.ts @@ -105,7 +105,7 @@ describe("createDangerousNameMatchingMutableAllowlistWarningCollector", () => { }, } as never, }), - ).toEqual([]); + ).toStrictEqual([]); }); }); @@ -115,8 +115,8 @@ describe("normalizeAllowFromList", () => { }); it("returns an empty list for non-arrays", () => { - expect(normalizeAllowFromList(undefined)).toEqual([]); - expect(normalizeAllowFromList(null)).toEqual([]); + expect(normalizeAllowFromList(undefined)).toStrictEqual([]); + expect(normalizeAllowFromList(null)).toStrictEqual([]); }); }); diff --git a/src/plugin-sdk/channel-streaming.test.ts b/src/plugin-sdk/channel-streaming.test.ts index dfb86348f31..0a42be8e99c 100644 --- a/src/plugin-sdk/channel-streaming.test.ts +++ b/src/plugin-sdk/channel-streaming.test.ts @@ -167,7 +167,7 @@ describe("channel-streaming", () => { it("uses auto progress labels when no explicit label is configured", () => { const invalidLabels = DEFAULT_PROGRESS_DRAFT_LABELS.filter((label) => !label.endsWith("...")); - expect(invalidLabels).toEqual([]); + expect(invalidLabels).toStrictEqual([]); expect(resolveChannelProgressDraftLabel({ random: () => 0 })).toBe( DEFAULT_PROGRESS_DRAFT_LABELS[0], ); diff --git a/src/plugin-sdk/command-auth.test.ts b/src/plugin-sdk/command-auth.test.ts index e40fee0271a..06dbcfd7301 100644 --- a/src/plugin-sdk/command-auth.test.ts +++ b/src/plugin-sdk/command-auth.test.ts @@ -135,7 +135,7 @@ describe("plugin-sdk/command-auth", () => { useAccessGroups && authorizers.some((entry) => entry.configured && entry.allowed), }); - expect(result.effectiveAllowFrom).toEqual([]); + expect(result.effectiveAllowFrom).toStrictEqual([]); expect(result.senderAllowedForCommands).toBe(false); expect(result.commandAuthorized).toBeUndefined(); }); diff --git a/src/plugin-sdk/direct-dm.test.ts b/src/plugin-sdk/direct-dm.test.ts index 2967d5cae42..159a3d940a5 100644 --- a/src/plugin-sdk/direct-dm.test.ts +++ b/src/plugin-sdk/direct-dm.test.ts @@ -89,7 +89,7 @@ describe("plugin-sdk/direct-dm", () => { expect(result.access.decision).toBe("block"); expect(result.access.reason).toBe("dmPolicy=open (not allowlisted)"); - expect(result.access.effectiveAllowFrom).toEqual([]); + expect(result.access.effectiveAllowFrom).toStrictEqual([]); expect(result.commandAuthorized).toBeUndefined(); }); diff --git a/src/plugin-sdk/facade-loader.test.ts b/src/plugin-sdk/facade-loader.test.ts index 5654965a766..8022f959a3b 100644 --- a/src/plugin-sdk/facade-loader.test.ts +++ b/src/plugin-sdk/facade-loader.test.ts @@ -320,7 +320,7 @@ describe("plugin-sdk facade loader", () => { }), ).toThrow("plugin load failure"); - expect(listImportedBundledPluginFacadeIds()).toEqual([]); + expect(listImportedBundledPluginFacadeIds()).toStrictEqual([]); expect(() => loadBundledPluginPublicSurfaceModuleSync<{ marker: string }>({ diff --git a/src/plugin-sdk/facade-runtime.test.ts b/src/plugin-sdk/facade-runtime.test.ts index db8cfd590aa..c7ef3f51def 100644 --- a/src/plugin-sdk/facade-runtime.test.ts +++ b/src/plugin-sdk/facade-runtime.test.ts @@ -243,7 +243,7 @@ describe("plugin-sdk facade runtime", () => { expect(loaded.marker).toBe("post-load-ok"); expect(reentryMarkers.length).toBeGreaterThan(0); const unexpectedReentryMarkers = reentryMarkers.filter((marker) => marker !== "post-load-ok"); - expect(unexpectedReentryMarkers).toEqual([]); + expect(unexpectedReentryMarkers).toStrictEqual([]); expect(listImportedBundledPluginFacadeIds()).toEqual(["demo"]); expect(loader).toHaveBeenCalledTimes(1); }); @@ -258,7 +258,7 @@ describe("plugin-sdk facade runtime", () => { }), ).toThrow("plugin load failure"); - expect(listImportedBundledPluginFacadeIds()).toEqual([]); + expect(listImportedBundledPluginFacadeIds()).toStrictEqual([]); // A second call must also throw (not return a stale empty sentinel). expect(() => diff --git a/src/plugin-sdk/fetch-auth.test.ts b/src/plugin-sdk/fetch-auth.test.ts index faecf3e382b..6833fa2d6f5 100644 --- a/src/plugin-sdk/fetch-auth.test.ts +++ b/src/plugin-sdk/fetch-auth.test.ts @@ -143,7 +143,9 @@ describe("fetchWithBearerAuthScopeFallback", () => { expect(response.status).toBe(200); expect(fetchFn).toHaveBeenCalledTimes(2); - expect(Object.getOwnPropertySymbols(fetchFn.mock.calls[0]?.[1]?.headers as object)).toEqual([]); + expect( + Object.getOwnPropertySymbols(fetchFn.mock.calls[0]?.[1]?.headers as object), + ).toStrictEqual([]); expect(new Headers(fetchFn.mock.calls[1]?.[1]?.headers).get("authorization")).toBe( "Bearer token-1", ); diff --git a/src/plugin-sdk/provider-model-shared.test.ts b/src/plugin-sdk/provider-model-shared.test.ts index 1c0623cb843..5ff4b08c97c 100644 --- a/src/plugin-sdk/provider-model-shared.test.ts +++ b/src/plugin-sdk/provider-model-shared.test.ts @@ -273,6 +273,6 @@ describe("resolveClaudeThinkingProfile", () => { const fixedBudgetLevels = profile.levels.filter( (level) => level.id === "xhigh" || level.id === "max", ); - expect(fixedBudgetLevels).toEqual([]); + expect(fixedBudgetLevels).toStrictEqual([]); }); }); diff --git a/src/plugin-sdk/provider-tools.test.ts b/src/plugin-sdk/provider-tools.test.ts index f767d1a9672..7448ee582ab 100644 --- a/src/plugin-sdk/provider-tools.test.ts +++ b/src/plugin-sdk/provider-tools.test.ts @@ -88,7 +88,7 @@ describe("buildProviderToolCompatFamilyHooks", () => { } as never, tools, }), - ).toEqual([]); + ).toStrictEqual([]); }); it("preserves explicit empty properties maps when normalizing strict openai schemas", () => { @@ -217,7 +217,7 @@ describe("buildProviderToolCompatFamilyHooks", () => { } as never, tools: [permissiveTool], }), - ).toEqual([]); + ).toStrictEqual([]); }); it("skips openai strict-tool normalization on non-native routes", () => { @@ -251,7 +251,7 @@ describe("buildProviderToolCompatFamilyHooks", () => { } as never, tools, }), - ).toEqual([]); + ).toStrictEqual([]); }); it("suppresses openai strict-schema diagnostics because transport falls back to strict false", () => { @@ -286,7 +286,7 @@ describe("buildProviderToolCompatFamilyHooks", () => { ], }); - expect(diagnostics).toEqual([]); + expect(diagnostics).toStrictEqual([]); }); it("covers the shared xAI tool compat patch", () => { diff --git a/src/plugin-sdk/provider-web-search-contract.test.ts b/src/plugin-sdk/provider-web-search-contract.test.ts index e1e3be1beec..eb37394db48 100644 --- a/src/plugin-sdk/provider-web-search-contract.test.ts +++ b/src/plugin-sdk/provider-web-search-contract.test.ts @@ -65,7 +65,7 @@ describe("createWebSearchProviderContractFields", () => { selectionPluginId: "ollama", }); - expect(fields.inactiveSecretPaths).toEqual([]); + expect(fields.inactiveSecretPaths).toStrictEqual([]); expect(fields.getCredentialValue({ apiKey: "ignored" })).toBeUndefined(); const searchConfig = { apiKey: "ignored" }; diff --git a/src/plugin-sdk/schema-normalization-runtime-contract.test.ts b/src/plugin-sdk/schema-normalization-runtime-contract.test.ts index 76ddaa4b4f0..a0d4d135f93 100644 --- a/src/plugin-sdk/schema-normalization-runtime-contract.test.ts +++ b/src/plugin-sdk/schema-normalization-runtime-contract.test.ts @@ -68,6 +68,6 @@ describe("OpenAI-family schema normalization runtime contract", () => { model: createNativeOpenAICodexResponsesModel() as never, tools: [tool] as never, }), - ).toEqual([]); + ).toStrictEqual([]); }); });