fix(tests): typed evaluator regression tests for strict check
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user