From 3b8b9adde5d18892af96329b6f9303979f9c04f5 Mon Sep 17 00:00:00 2001 From: Martina Ferrari Date: Thu, 3 Mar 2022 14:05:49 +0000 Subject: [PATCH] fix(tests): ensure all tests honour BINARY envvar (#8092) Without this patch, two tests ignore the BINARY envvar, and fail when not using the embedded chromium, unless the chromium executable path is defined via PUPPETEER_EXECUTABLE_PATH, which should not be considered according to the docs. --- test/launcher.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/launcher.spec.ts b/test/launcher.spec.ts index 6266c59a..46d56c55 100644 --- a/test/launcher.spec.ts +++ b/test/launcher.spec.ts @@ -708,9 +708,9 @@ describe('Launcher specs', function () { itFailsFirefox( 'should be able to connect to the same page simultaneously', async () => { - const { puppeteer } = getTestState(); + const { puppeteer, defaultBrowserOptions } = getTestState(); - const browserOne = await puppeteer.launch(); + const browserOne = await puppeteer.launch(defaultBrowserOptions); const browserTwo = await puppeteer.connect({ browserWSEndpoint: browserOne.wsEndpoint(), }); @@ -726,8 +726,8 @@ describe('Launcher specs', function () { } ); it('should be able to reconnect', async () => { - const { puppeteer, server } = getTestState(); - const browserOne = await puppeteer.launch(); + const { puppeteer, server, defaultBrowserOptions } = getTestState(); + const browserOne = await puppeteer.launch(defaultBrowserOptions); const browserWSEndpoint = browserOne.wsEndpoint(); const pageOne = await browserOne.newPage(); await pageOne.goto(server.EMPTY_PAGE);