fix(test): repair cron and loader regressions

This commit is contained in:
Vincent Koc
2026-03-22 14:37:59 -07:00
parent dcd5473283
commit 11ca41f457
3 changed files with 6 additions and 2 deletions

View File

@@ -3,6 +3,9 @@ import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { afterAll, afterEach, beforeAll, beforeEach, vi } from "vitest";
import { clearAllBootstrapSnapshots } from "../agents/bootstrap-cache.js";
import { clearSessionStoreCacheForTest } from "../config/sessions/store.js";
import { resetAgentRunContextForTest } from "../infra/agent-events.js";
import { useFrozenTime, useRealTime } from "../test-utils/frozen-time.js";
import type { CronService } from "./service.js";
import type { CronJob, CronJobState } from "./types.js";

View File

@@ -1,5 +1,5 @@
import fs from "node:fs/promises";
import { describe, expect, it, vi } from "vitest";
import { afterEach, describe, expect, it, vi } from "vitest";
import type { HeartbeatRunResult } from "../infra/heartbeat-wake.js";
import { clearCommandLane, setCommandLaneConcurrency } from "../process/command-queue.js";
import { CommandLane } from "../process/lanes.js";

View File

@@ -2,6 +2,7 @@ import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { afterAll, afterEach, describe, expect, it } from "vitest";
import packageJson from "../../package.json" with { type: "json" };
import { emitDiagnosticEvent, resetDiagnosticEventsForTest } from "../infra/diagnostic-events.js";
import { buildMemoryPromptSection, registerMemoryPromptSection } from "../memory/prompt-section.js";
import { withEnv } from "../test-utils/env.js";
@@ -813,7 +814,7 @@ describe("loadOpenClawPlugins", () => {
expect(memory?.status).toBe("loaded");
expect(memory?.origin).toBe("bundled");
expect(memory?.name).toBe("Memory (Core)");
expect(memory?.version).toBe("1.2.3");
expect(memory?.version).toBe(packageJson.version);
});
it("handles config-path and scoped plugin loads", () => {
const scenarios = [