diff --git a/src/commands/health-format.test.ts b/src/commands/health-format.test.ts index a0cd88322..d94422466 100644 --- a/src/commands/health-format.test.ts +++ b/src/commands/health-format.test.ts @@ -2,12 +2,9 @@ import { describe, expect, it } from "vitest"; import { formatHealthCheckFailure } from "./health-format.js"; -const stripAnsi = (input: string) => - input.replace( - // biome-ignore lint/suspicious/noControlCharactersInRegex: strip ANSI escape sequences - /\u001b\[[0-9;]*m/g, - "", - ); +const ansiEscape = String.fromCharCode(27); +const ansiRegex = new RegExp(`${ansiEscape}\\[[0-9;]*m`, "g"); +const stripAnsi = (input: string) => input.replace(ansiRegex, ""); describe("formatHealthCheckFailure", () => { it("keeps non-rich output stable", () => { diff --git a/src/gateway/gateway-models.profiles.live.test.ts b/src/gateway/gateway-models.profiles.live.test.ts index e2e1fdd6a..9458cc6a0 100644 --- a/src/gateway/gateway-models.profiles.live.test.ts +++ b/src/gateway/gateway-models.profiles.live.test.ts @@ -209,9 +209,9 @@ describeLive("gateway live (dev agent, profile keys)", () => { const nextCfg = { ...cfg, agents: { - ...(cfg.agents ?? {}), + ...cfg.agents, defaults: { - ...(cfg.agents?.defaults ?? {}), + ...cfg.agents?.defaults, models: Object.fromEntries( candidates.map((m) => [`${m.provider}/${m.id}`, {}]), ),