Tests: isolate webhook path suite and reset cron auth state

This commit is contained in:
Andrii Furmanets
2026-03-02 20:02:52 +02:00
committed by Peter Steinberger
parent 3bd0505433
commit 662f389f45
2 changed files with 7 additions and 1 deletions

View File

@@ -3,7 +3,9 @@ import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { clearRuntimeAuthProfileStoreSnapshots } from "../agents/auth-profiles.js";
import { loadModelCatalog } from "../agents/model-catalog.js";
import { _probeThrottleInternals } from "../agents/model-fallback.js";
import { runEmbeddedPiAgent } from "../agents/pi-embedded.js";
import type { CliDeps } from "../cli/deps.js";
import { runCronIsolatedAgentTurn } from "./isolated-agent.js";
@@ -213,6 +215,8 @@ describe("runCronIsolatedAgentTurn", () => {
});
beforeEach(() => {
clearRuntimeAuthProfileStoreSnapshots();
_probeThrottleInternals.lastProbeAttempt.clear();
vi.mocked(runEmbeddedPiAgent).mockClear();
vi.mocked(loadModelCatalog).mockResolvedValue([]);
});