chore: Fix types in tests 28/N.

This commit is contained in:
cpojer
2026-02-17 14:32:18 +09:00
parent 97c8f4999e
commit 03e6acd051
14 changed files with 104 additions and 55 deletions

View File

@@ -255,8 +255,12 @@ describe("commands registry args", () => {
});
it("resolves function-based choices with a default provider/model context", () => {
let seen: { provider: string; model: string; commandKey: string; argName: string } | null =
null;
let seen: {
provider?: string;
model?: string;
commandKey: string;
argName: string;
} | null = null;
const command: ChatCommandDefinition = {
key: "think",
@@ -284,10 +288,16 @@ describe("commands registry args", () => {
{ label: "low", value: "low" },
{ label: "high", value: "high" },
]);
expect(seen?.commandKey).toBe("think");
expect(seen?.argName).toBe("level");
expect(seen?.provider).toBeTruthy();
expect(seen?.model).toBeTruthy();
const seenChoice = seen as {
provider?: string;
model?: string;
commandKey: string;
argName: string;
} | null;
expect(seenChoice?.commandKey).toBe("think");
expect(seenChoice?.argName).toBe("level");
expect(seenChoice?.provider).toBeTruthy();
expect(seenChoice?.model).toBeTruthy();
});
it("does not show menus when args were provided as raw text only", () => {