From 3f06722babd677cd77da55670f5450f2a36d154a Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Tue, 28 Apr 2020 15:46:08 +0100 Subject: [PATCH] Fix test runner under Node 14 Apply the same fix as was used in the "client" repo in https://github.com/hypothesis/client/pull/2086. --- tests/karma.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/karma.config.js b/tests/karma.config.js index b37a018a..0d7e869f 100644 --- a/tests/karma.config.js +++ b/tests/karma.config.js @@ -3,7 +3,15 @@ /* global process */ let chromeFlags = []; -process.env.CHROME_BIN = require('puppeteer').executablePath(); + +if (process.version.startsWith('v14.')) { + // See https://github.com/puppeteer/puppeteer/issues/5719 + console.warn( + 'Using system Chrome instead of Puppeteer due to issue with Node 14' + ); +} else { + process.env.CHROME_BIN = require('puppeteer').executablePath(); +} // On Travis and in Docker, the tests run as root, so the sandbox must be // disabled.