mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 22:34:32 +00:00
test: dedupe heartbeat and action-runner fixtures
This commit is contained in:
@@ -11,6 +11,7 @@ import { setActivePluginRegistry } from "../plugins/runtime.js";
|
||||
import { createPluginRuntime } from "../plugins/runtime/index.js";
|
||||
import { createTestRegistry } from "../test-utils/channel-plugins.js";
|
||||
import { runHeartbeatOnce } from "./heartbeat-runner.js";
|
||||
import { seedSessionStore } from "./heartbeat-runner.test-utils.js";
|
||||
import { enqueueSystemEvent, resetSystemEventsForTest } from "./system-events.js";
|
||||
|
||||
// Avoid pulling optional runtime deps during isolated runs.
|
||||
@@ -50,22 +51,11 @@ describe("Ghost reminder bug (issue #13317)", () => {
|
||||
};
|
||||
const sessionKey = resolveMainSessionKey(cfg);
|
||||
|
||||
await fs.writeFile(
|
||||
storePath,
|
||||
JSON.stringify(
|
||||
{
|
||||
[sessionKey]: {
|
||||
sessionId: "sid",
|
||||
updatedAt: Date.now(),
|
||||
lastChannel: "telegram",
|
||||
lastProvider: "telegram",
|
||||
lastTo: "155462274",
|
||||
},
|
||||
},
|
||||
null,
|
||||
2,
|
||||
),
|
||||
);
|
||||
await seedSessionStore(storePath, sessionKey, {
|
||||
lastChannel: "telegram",
|
||||
lastProvider: "telegram",
|
||||
lastTo: "155462274",
|
||||
});
|
||||
|
||||
return { cfg, sessionKey };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user