perf(test): use lightweight thinking fallback fixture

This commit is contained in:
Peter Steinberger
2026-07-07 03:59:28 -04:00
parent 48e77b6abf
commit 82b0f7cdc8

View File

@@ -25,7 +25,7 @@ describe("parseCommand", () => {
describe("getSlashCommands", () => {
beforeAll(() => {
// Provider thinking policies are process-stable; warm the fallback before timing assertions.
getSlashCommands({ provider: "anthropic", model: "claude-sonnet-4-6", thinkingLevels: [] });
getSlashCommands({ provider: "minimax", model: "MiniMax-M3", thinkingLevels: [] });
});
it("provides level completions for built-in toggles", () => {
@@ -78,8 +78,8 @@ describe("getSlashCommands", () => {
it("falls back to provider-resolved levels when thinkingLevels is empty (#76482)", () => {
const commands = getSlashCommands({
provider: "anthropic",
model: "claude-sonnet-4-6",
provider: "minimax",
model: "MiniMax-M3",
thinkingLevels: [], // empty from lightweight session row
});
const think = commands.find((command) => command.name === "think");
@@ -89,7 +89,10 @@ describe("getSlashCommands", () => {
if (!Array.isArray(completions)) {
throw new Error("expected synchronous thinking-level completions");
}
expect(completions.length).toBeGreaterThan(0);
expect(completions).toEqual([
{ value: "off", label: "off" },
{ value: "adaptive", label: "adaptive" },
]);
});
it("merges dynamic gateway commands", () => {