test: use cron embedded runtime mock

This commit is contained in:
Peter Steinberger
2026-04-13 08:58:24 -07:00
parent 00415e2010
commit cf3d27ab94

View File

@@ -1,7 +1,8 @@
import "./isolated-agent.mocks.js";
import fs from "node:fs/promises";
import path from "node:path";
import { beforeEach, describe, expect, it } from "vitest";
import { beforeEach, describe, expect, it, vi } from "vitest";
import * as modelSelection from "../agents/model-selection.js";
import { runCronIsolatedAgentTurn } from "./isolated-agent.js";
import { makeCfg, makeJob, writeSessionStore } from "./isolated-agent.test-harness.js";
import {
@@ -23,8 +24,9 @@ setupRunCronIsolatedAgentTurnSuite();
describe("runCronIsolatedAgentTurn session identity", () => {
beforeEach(() => {
mockRunCronFallbackPassthrough();
vi.spyOn(modelSelection, "resolveThinkingDefault").mockReturnValue("off");
runEmbeddedPiAgentMock.mockClear();
mockRunCronFallbackPassthrough();
});
it("passes resolved agentDir to runEmbeddedPiAgent", async () => {