mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2025-07-26 08:32:26 +08:00
chore: fix test harness, close the client (#312)
This commit is contained in:
parent
1b60870f50
commit
fd22def4c5
@ -54,7 +54,7 @@ export const test = baseTest.extend<TestFixtures, WorkerFixtures>({
|
||||
|
||||
startClient: async ({ mcpHeadless, mcpBrowser }, use, testInfo) => {
|
||||
const userDataDir = testInfo.outputPath('user-data-dir');
|
||||
let client: StdioClientTransport | undefined;
|
||||
let client: Client | undefined;
|
||||
|
||||
await use(async options => {
|
||||
const args = ['--user-data-dir', userDataDir];
|
||||
@ -73,7 +73,7 @@ export const test = baseTest.extend<TestFixtures, WorkerFixtures>({
|
||||
command: 'node',
|
||||
args: [path.join(__dirname, '../cli.js'), ...args],
|
||||
});
|
||||
const client = new Client({ name: 'test', version: '1.0.0' });
|
||||
client = new Client({ name: 'test', version: '1.0.0' });
|
||||
await client.connect(transport);
|
||||
await client.ping();
|
||||
return client;
|
||||
|
Loading…
x
Reference in New Issue
Block a user