From 611acbe68731f42a11f6b2118f9b084515d229b8 Mon Sep 17 00:00:00 2001 From: Bolu Oyewale Date: Tue, 19 Jul 2022 09:04:56 +0200 Subject: [PATCH] Allow launch options/args to be passed in from running applications --- lib/smoke/smoke-test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/smoke/smoke-test.js b/lib/smoke/smoke-test.js index a158304..9aa511a 100644 --- a/lib/smoke/smoke-test.js +++ b/lib/smoke/smoke-test.js @@ -25,6 +25,7 @@ class SmokeTest { this.breakpoint = options.breakpoint; this.browsers = options.browsers; this.https = this.host.includes('https'); + this.launchOptions = options.launchOptions || {}; //TODO: default should be chrome, browsers will be opt-in if (!/https?\:\/\//.test(this.host)) { @@ -64,7 +65,7 @@ class SmokeTest { const puppetTests = []; const crossBrowserTests = []; - this.browser = await puppeteer.launch(); + this.browser = await puppeteer.launch(this.launchOptions); for (let suiteOptions of configsToRun) { for (let path in suiteOptions.urls) { //eslint-disable-line guard-for-in