mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 01:29:56 +00:00
test(browser): isolate list-profile MCP cache (#163830)
This commit is contained in:
parent
ba8c26cae0
commit
db30aa2108
1 changed files with 7 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { ErrorCode, McpError } from "@modelcontextprotocol/sdk/types.js";
|
||||
import { expectDefined } from "@openclaw/normalization-core";
|
||||
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import "./server-context.chrome-test-harness.js";
|
||||
import { setChromeMcpProcessCleanupDepsForTest } from "./chrome-mcp-process.js";
|
||||
import {
|
||||
|
|
@ -9,6 +9,7 @@ import {
|
|||
setChromeMcpSessionFactoryForTest,
|
||||
} from "./chrome-mcp-session.js";
|
||||
import { listChromeMcpTabs } from "./chrome-mcp-tabs.js";
|
||||
import { getChromeMcpModule } from "./chrome-mcp.runtime.js";
|
||||
import * as chromeModule from "./chrome.js";
|
||||
import { registerBrowserBasicRoutes } from "./routes/basic.js";
|
||||
import { createBrowserRouteApp, createBrowserRouteResponse } from "./routes/test-helpers.js";
|
||||
|
|
@ -16,7 +17,12 @@ import { createBrowserRouteContext } from "./server-context.js";
|
|||
import { beginProfileTransition } from "./server-context.lifecycle.js";
|
||||
import { makeBrowserProfile, makeBrowserServerState } from "./server-context.test-harness.js";
|
||||
|
||||
beforeEach(() => {
|
||||
getChromeMcpModule.clear();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
getChromeMcpModule.clear();
|
||||
await resetChromeMcpSessionsForTest();
|
||||
vi.clearAllMocks();
|
||||
vi.restoreAllMocks();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue