fix: sync tests with config normalization

This commit is contained in:
Peter Steinberger
2026-01-24 13:32:22 +00:00
parent c8afa8207c
commit 386d21b6d1
5 changed files with 6 additions and 5 deletions

View File

@@ -54,7 +54,7 @@ describe("getOpencodeZenStaticFallbackModels", () => {
it("returns an array of models", () => {
const models = getOpencodeZenStaticFallbackModels();
expect(Array.isArray(models)).toBe(true);
expect(models.length).toBe(10);
expect(models.length).toBe(9);
});
it("includes Claude, GPT, Gemini, and GLM models", () => {

View File

@@ -162,7 +162,7 @@ describe("cron cli", () => {
const updateCall = callGatewayFromCli.mock.calls.find((call) => call[0] === "cron.update");
const patch = updateCall?.[2] as { patch?: { agentId?: unknown } };
expect(patch?.patch?.agentId).toBe("ops");
expect(patch?.patch?.agentId).toBe("Ops");
callGatewayFromCli.mockClear();
await program.parseAsync(["cron", "edit", "job-2", "--clear-agent"], {

View File

@@ -38,7 +38,7 @@ describe("normalizeCronJobCreate", () => {
},
}) as unknown as Record<string, unknown>;
expect(normalized.agentId).toBe("ops");
expect(normalized.agentId).toBe("Ops");
const cleared = normalizeCronJobCreate({
name: "agent-clear",

View File

@@ -1,3 +1,4 @@
import { inspect } from "node:util";
import { Client } from "@buape/carbon";
import { GatewayIntents, GatewayPlugin } from "@buape/carbon/gateway";
import { Routes } from "discord-api-types/v10";
@@ -95,7 +96,7 @@ function formatDiscordDeployErrorDetails(err: unknown): string {
try {
bodyText = JSON.stringify(rawBody);
} catch {
bodyText = String(rawBody);
bodyText = inspect(rawBody, { depth: 3 });
}
if (bodyText) {
const maxLen = 800;

View File

@@ -180,7 +180,7 @@ describe("resolveAgentRoute", () => {
accountId: undefined,
peer: { kind: "dm", id: "+1000" },
});
expect(defaultRoute.agentId).toBe("defaultacct");
expect(defaultRoute.agentId).toBe("defaultAcct");
expect(defaultRoute.matchedBy).toBe("binding.account");
const otherRoute = resolveAgentRoute({