fix: Load MCP teardown only in Playwright workers

This commit is contained in:
Oleg Isonen committed 2026-11-15 15:43:59 +00:00
1 parent ec40adda07
commit e3c7282dbc
1 file changed
+2 -1
+2 -1
View File
@@ -5,7 +5,6 @@ import {
type BrowserContextOptions,
} from "@playwright/test";
import env from "../app/env/env.server";
import { closePreviewFormMcpClient } from "./flows/mcp-preview-submit";
const builderPort = process.env.PORT ?? "3000";
@@ -59,6 +58,8 @@ export const test = base.extend<{}, { mcpClientCleanup: void }>({
mcpClientCleanup: [
async ({}, use) => {
await use();
const { closePreviewFormMcpClient } =
await import("./flows/mcp-preview-submit");
await closePreviewFormMcpClient();
},
{ scope: "worker", auto: true },