Skip to content

Commit

Permalink
Set WEBKIT_HEADLESS_BIN
Browse files Browse the repository at this point in the history
  • Loading branch information
dlarocque committed Sep 6, 2024
1 parent 75cf2a6 commit 864c935
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion config/karma.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const karma = require('karma');
const path = require('path');
const webpackTestConfig = require('./webpack.test');
const { argv } = require('yargs');
const { webkit } = require('playwright')

function determineBrowsers() {
const supportedBrowsers = ['ChromeHeadless', 'WebkitHeadless', 'Firefox'];
Expand All @@ -36,9 +37,14 @@ function determineBrowsers() {
)}.`
);
return [];
} else {
if (validBrowsers.includes('WebkitHeadless')) {
process.env.WEBKIT_HEADLESS_BIN = webkit.executablePath();
}

return validBrowsers;
}

return validBrowsers;
} else {
console.log(
"The 'BROWSER' environment variable is undefined. Defaulting to 'ChromeHeadless'."
Expand Down

0 comments on commit 864c935

Please sign in to comment.