test: fix gate regressions

This commit is contained in:
Peter Steinberger
2026-02-24 04:39:29 +00:00
parent 2d6d6797d8
commit 31f2bf9519
6 changed files with 53 additions and 41 deletions

View File

@@ -112,7 +112,7 @@ async function runReasoningDefaultCase(params: {
describe("directive behavior", () => {
installDirectiveBehaviorE2EHooks();
it("shows /think defaults for reasoning and non-reasoning models", async () => {
it("covers /think status and reasoning defaults for reasoning and non-reasoning models", async () => {
await withTempHome(async (home) => {
await expectThinkStatusForReasoningModel({
home,
@@ -125,6 +125,25 @@ describe("directive behavior", () => {
expectedLevel: "off",
});
expect(runEmbeddedPiAgent).not.toHaveBeenCalled();
vi.mocked(runEmbeddedPiAgent).mockClear();
for (const scenario of [
{
expectedThinkLevel: "low" as const,
expectedReasoningLevel: "off" as const,
},
{
expectedThinkLevel: "off" as const,
expectedReasoningLevel: "on" as const,
thinkingDefault: "off" as const,
},
]) {
await runReasoningDefaultCase({
home,
...scenario,
});
}
});
});
it("renders model list and status variants across catalog/config combinations", async () => {
@@ -282,26 +301,6 @@ describe("directive behavior", () => {
expect(runEmbeddedPiAgent).toHaveBeenCalledOnce();
});
});
it("applies reasoning defaults based on thinkingDefault configuration", async () => {
await withTempHome(async (home) => {
for (const scenario of [
{
expectedThinkLevel: "low" as const,
expectedReasoningLevel: "off" as const,
},
{
expectedThinkLevel: "off" as const,
expectedReasoningLevel: "on" as const,
thinkingDefault: "off" as const,
},
]) {
await runReasoningDefaultCase({
home,
...scenario,
});
}
});
});
it("passes elevated defaults when sender is approved", async () => {
await withTempHome(async (home) => {
mockEmbeddedTextResult("done");