chore: introduce capabilities argument (#135)

This commit is contained in:
Pavel Feldman
2025-04-04 17:14:30 -07:00
committed by GitHub
parent 707ebbf4d4
commit abd56f514b
24 changed files with 432 additions and 242 deletions

View File

@@ -24,7 +24,7 @@ import { Client } from '@modelcontextprotocol/sdk/client/index.js';
type Fixtures = {
client: Client;
visionClient: Client;
startClient: (options?: { args?: string[], vision?: boolean }) => Promise<Client>;
startClient: (options?: { args?: string[] }) => Promise<Client>;
wsEndpoint: string;
cdpEndpoint: string;
};
@@ -36,7 +36,7 @@ export const test = baseTest.extend<Fixtures>({
},
visionClient: async ({ startClient }, use) => {
await use(await startClient({ vision: true }));
await use(await startClient({ args: ['--vision'] }));
},
startClient: async ({ }, use, testInfo) => {
@@ -45,8 +45,6 @@ export const test = baseTest.extend<Fixtures>({
use(async options => {
const args = ['--headless', '--user-data-dir', userDataDir];
if (options?.vision)
args.push('--vision');
if (options?.args)
args.push(...options.args);
const transport = new StdioClientTransport({