mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:20:43 +00:00
test: mock browser cleanup in heartbeat session tests
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
||||
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../../config/config.js";
|
||||
import { loadSessionStore, saveSessionStore } from "../../config/sessions/store.js";
|
||||
import type { SessionEntry } from "../../config/sessions/types.js";
|
||||
import type { MsgContext } from "../templating.js";
|
||||
import { initSessionState } from "./session.js";
|
||||
|
||||
vi.mock("../../plugin-sdk/browser-maintenance.js", () => ({
|
||||
closeTrackedBrowserTabsForSessions: vi.fn(async () => 0),
|
||||
}));
|
||||
|
||||
describe("initSessionState - heartbeat should not trigger session reset", () => {
|
||||
let tempDir: string;
|
||||
let storePath: string;
|
||||
|
||||
Reference in New Issue
Block a user