mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -07:00
test: add browser agent integration tests (#21151)
This commit is contained in:
@@ -147,7 +147,7 @@ describe('BrowserManager', () => {
|
||||
// Verify StdioClientTransport was created with correct args
|
||||
expect(StdioClientTransport).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
command: 'npx',
|
||||
command: process.platform === 'win32' ? 'npx.cmd' : 'npx',
|
||||
args: expect.arrayContaining([
|
||||
'-y',
|
||||
expect.stringMatching(/chrome-devtools-mcp@/),
|
||||
@@ -185,7 +185,7 @@ describe('BrowserManager', () => {
|
||||
|
||||
expect(StdioClientTransport).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
command: 'npx',
|
||||
command: process.platform === 'win32' ? 'npx.cmd' : 'npx',
|
||||
args: expect.arrayContaining(['--headless']),
|
||||
}),
|
||||
);
|
||||
@@ -210,7 +210,7 @@ describe('BrowserManager', () => {
|
||||
|
||||
expect(StdioClientTransport).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
command: 'npx',
|
||||
command: process.platform === 'win32' ? 'npx.cmd' : 'npx',
|
||||
args: expect.arrayContaining(['--userDataDir', '/path/to/profile']),
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -283,7 +283,7 @@ export class BrowserManager {
|
||||
// stderr is piped (not inherited) to prevent MCP server banners and
|
||||
// warnings from corrupting the UI in alternate buffer mode.
|
||||
this.mcpTransport = new StdioClientTransport({
|
||||
command: 'npx',
|
||||
command: process.platform === 'win32' ? 'npx.cmd' : 'npx',
|
||||
args: mcpArgs,
|
||||
stderr: 'pipe',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user