mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-20 21:23:23 +00:00
fix(test): repair cron and loader regressions
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user