mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 17:20:45 +00:00
test: use cron embedded runtime mock
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user