@@ -17,15 +17,26 @@ describe('MCP command normalization', () => {
1717 const normalized = normalizeMcpCommandForSpawn ( 'npx' , [ 'chrome-devtools-mcp@latest' ] ) ;
1818 expect ( normalized ) . toEqual ( {
1919 command : 'npx' ,
20- args : [ '-y' , 'chrome-devtools-mcp@latest' ] ,
20+ args : [ '-y' , 'chrome-devtools-mcp@latest' , '--no-usage-stats' ] ,
2121 } ) ;
2222 } ) ;
2323
2424 it ( 'does not duplicate existing -y flag' , ( ) => {
2525 const normalized = normalizeMcpCommandForSpawn ( 'npx' , [ '-y' , 'chrome-devtools-mcp@latest' ] ) ;
2626 expect ( normalized ) . toEqual ( {
2727 command : 'npx' ,
28- args : [ '-y' , 'chrome-devtools-mcp@latest' ] ,
28+ args : [ '-y' , 'chrome-devtools-mcp@latest' , '--no-usage-stats' ] ,
29+ } ) ;
30+ } ) ;
31+
32+ it ( 'does not duplicate chrome-devtools non-interactive flag' , ( ) => {
33+ const normalized = normalizeMcpCommandForSpawn (
34+ 'npx' ,
35+ [ '-y' , 'chrome-devtools-mcp@latest' , '--no-usage-stats' ]
36+ ) ;
37+ expect ( normalized ) . toEqual ( {
38+ command : 'npx' ,
39+ args : [ '-y' , 'chrome-devtools-mcp@latest' , '--no-usage-stats' ] ,
2940 } ) ;
3041 } ) ;
3142
@@ -53,6 +64,14 @@ describe('MCP command normalization', () => {
5364 } ) ;
5465 } ) ;
5566
67+ it ( 'adds chrome-devtools non-interactive flag for config normalization' , ( ) => {
68+ const normalized = normalizeMcpCommandForConfig ( 'npx' , [ 'chrome-devtools-mcp@latest' ] ) ;
69+ expect ( normalized ) . toEqual ( {
70+ command : 'npx' ,
71+ args : [ '-y' , 'chrome-devtools-mcp@latest' , '--no-usage-stats' ] ,
72+ } ) ;
73+ } ) ;
74+
5675 it ( 'detects npx command names across platforms' , ( ) => {
5776 expect ( isNpxCommand ( 'npx' ) ) . toBe ( true ) ;
5877 expect ( isNpxCommand ( 'npx.cmd' ) ) . toBe ( true ) ;
0 commit comments