Skip to content

Commit 48e55ee

Browse files
authored
Fix: add chrome --disable-dev-shm-usage flag (#41)
1 parent b521678 commit 48e55ee

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const getError = (id, expected, results) => {
5151
return `Expected category ${chalk.magenta(
5252
category.title,
5353
)} to be greater or equal to ${chalk.green(expected)} but got ${chalk.red(
54-
category.score,
54+
category.score !== null ? category.score : 'unknown',
5555
)}`;
5656
};
5757

src/lighthouse.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ const runLighthouse = async (browserPath, url) => {
2222
log.setLevel(logLevel);
2323
chrome = await chromeLauncher.launch({
2424
chromePath: browserPath,
25-
chromeFlags: ['--headless', '--no-sandbox', '--disable-gpu'],
25+
chromeFlags: [
26+
'--headless',
27+
'--no-sandbox',
28+
'--disable-gpu',
29+
'--disable-dev-shm-usage',
30+
],
2631
logLevel,
2732
});
2833
const results = await lighthouse(url, {

0 commit comments

Comments
 (0)