Skip to content

Commit 43897af

Browse files
test: switch to pipes (#482)
1 parent 02e0765 commit 43897af

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/utils.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
import logger from 'debug';
77
import type {Browser} from 'puppeteer';
88
import puppeteer, {Locator} from 'puppeteer';
9-
import type {Frame, HTTPRequest, HTTPResponse} from 'puppeteer-core';
9+
import type {
10+
Frame,
11+
HTTPRequest,
12+
HTTPResponse,
13+
LaunchOptions,
14+
} from 'puppeteer-core';
1015

1116
import {McpContext} from '../src/McpContext.js';
1217
import {McpResponse} from '../src/McpResponse.js';
@@ -18,11 +23,12 @@ export async function withBrowser(
1823
cb: (response: McpResponse, context: McpContext) => Promise<void>,
1924
options: {debug?: boolean; autoOpenDevTools?: boolean} = {},
2025
) {
21-
const launchOptions = {
26+
const launchOptions: LaunchOptions = {
2227
executablePath: process.env.PUPPETEER_EXECUTABLE_PATH,
2328
headless: !options.debug,
2429
defaultViewport: null,
2530
devtools: options.autoOpenDevTools ?? false,
31+
pipe: true,
2632
handleDevToolsAsPage: true,
2733
};
2834
const key = JSON.stringify(launchOptions);

0 commit comments

Comments
 (0)