@@ -17,6 +17,8 @@ describe('cli args parsing', () => {
1717 isolated : false ,
1818 $0 : 'npx chrome-devtools-mcp@latest' ,
1919 channel : 'stable' ,
20+ 'chrome-arg' : [ ] ,
21+ chromeArg : [ ] ,
2022 } ) ;
2123 } ) ;
2224
@@ -35,6 +37,8 @@ describe('cli args parsing', () => {
3537 'browser-url' : 'http://localhost:3000' ,
3638 browserUrl : 'http://localhost:3000' ,
3739 u : 'http://localhost:3000' ,
40+ 'chrome-arg' : [ ] ,
41+ chromeArg : [ ] ,
3842 } ) ;
3943 } ) ;
4044
@@ -54,6 +58,8 @@ describe('cli args parsing', () => {
5458 browserUrl : undefined ,
5559 u : undefined ,
5660 channel : 'stable' ,
61+ 'chrome-arg' : [ ] ,
62+ chromeArg : [ ] ,
5763 } ) ;
5864 } ) ;
5965
@@ -72,6 +78,8 @@ describe('cli args parsing', () => {
7278 'executable-path' : '/tmp/test 123/chrome' ,
7379 e : '/tmp/test 123/chrome' ,
7480 executablePath : '/tmp/test 123/chrome' ,
81+ 'chrome-arg' : [ ] ,
82+ chromeArg : [ ] ,
7583 } ) ;
7684 } ) ;
7785
@@ -92,6 +100,26 @@ describe('cli args parsing', () => {
92100 width : 888 ,
93101 height : 777 ,
94102 } ,
103+ 'chrome-arg' : [ ] ,
104+ chromeArg : [ ] ,
105+ } ) ;
106+ } ) ;
107+
108+ it ( 'parses viewport' , async ( ) => {
109+ const args = parseArguments ( '1.0.0' , [
110+ 'node' ,
111+ 'main.js' ,
112+ `--chrome-arg='--no-sandbox'` ,
113+ `--chrome-arg='--disable-setuid-sandbox'` ,
114+ ] ) ;
115+ assert . deepStrictEqual ( args , {
116+ _ : [ ] ,
117+ headless : false ,
118+ isolated : false ,
119+ $0 : 'npx chrome-devtools-mcp@latest' ,
120+ channel : 'stable' ,
121+ 'chrome-arg' : [ '--no-sandbox' , '--disable-setuid-sandbox' ] ,
122+ chromeArg : [ '--no-sandbox' , '--disable-setuid-sandbox' ] ,
95123 } ) ;
96124 } ) ;
97125} ) ;
0 commit comments