File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ describe('pages', () => {
198198 await context . uninstallExtension ( extensionId ) ;
199199 } ,
200200 {
201- userDataDir : '/tmp/chrome-test' ,
201+ spawnNewBrowser : true ,
202202 } ,
203203 {
204204 categoryExtensions : true ,
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export async function withBrowser(
6262 debug ?: boolean ;
6363 autoOpenDevTools ?: boolean ;
6464 executablePath ?: string ;
65- userDataDir ?: string ;
65+ spawnNewBrowser ?: boolean ;
6666 } = { } ,
6767) {
6868 const launchOptions : LaunchOptions = {
@@ -75,11 +75,10 @@ export async function withBrowser(
7575 handleDevToolsAsPage : true ,
7676 args : [ '--screen-info={3840x2160}' ] ,
7777 enableExtensions : true ,
78- userDataDir : options . userDataDir ,
7978 } ;
8079 const key = JSON . stringify ( launchOptions ) ;
8180
82- let browser = browsers . get ( key ) ;
81+ let browser = options . spawnNewBrowser && browsers . get ( key ) ;
8382 if ( ! browser ) {
8483 browser = await puppeteer . launch ( launchOptions ) ;
8584 browsers . set ( key , browser ) ;
@@ -104,7 +103,7 @@ export async function withMcpContext(
104103 autoOpenDevTools ?: boolean ;
105104 performanceCrux ?: boolean ;
106105 executablePath ?: string ;
107- userDataDir ?: string ;
106+ spawnNewBrowser ?: boolean ;
108107 } = { } ,
109108 args : ParsedArguments = { } as ParsedArguments ,
110109) {
You can’t perform that action at this time.
0 commit comments