fix(tests): typed evaluator regression tests for strict check

This commit is contained in:
can1357
2026-08-13 01:25:50 +02:00
parent ea10cce8d8
commit 25e30bfd0b
2 changed files with 5 additions and 2 deletions
@@ -107,7 +107,10 @@ describe("pi.typebox compatibility shim", () => {
});
it("applies schema-valued additionalProperties only to undeclared raw-object keys", () => {
const schema = Type.Object({ known: { type: "number" } }, { additionalProperties: { type: "string" } });
const schema = Type.Object(
{ known: { type: "number" } as unknown as TSchema },
{ additionalProperties: { type: "string" } as unknown as TSchema },
);
expect(schema.safeParse({ known: 1, extra: "ok" }).success).toBe(true);
expect(schema.safeParse({ known: "bad", extra: "ok" }).success).toBe(false);
@@ -125,7 +125,7 @@ describe("issue #8137 — inline /skill in mode-command prompts", () => {
const turn = new Promise<void>(resolve => {
finishTurn = resolve;
});
const handleModeCommand = vi.fn(() => turn);
const handleModeCommand = vi.fn((_prompt?: string) => turn);
const clearDraft = vi.fn();
const setText = vi.fn();
const command = BUILTIN_MODE_SLASH_COMMANDS.find(candidate => candidate.name === name);