Skip to content

Commit b6f15ea

Browse files
committed
try executable path
1 parent f254253 commit b6f15ea

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/e2e/mocks/puppeteer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const puppeteer = () =>
66
process: () => ({ spawnfile: 'path' }),
77
close: () => Promise.resolve(),
88
}),
9+
executablePath: () => ""
910
},
1011
};
1112
});

src/run-lighthouse.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ export const getBrowserPath = async () => {
1111
return cachedBrowserPath;
1212
}
1313

14-
const browser = await puppeteer.launch({
15-
headless: 'new',
16-
args: ['--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage'],
17-
});
18-
cachedBrowserPath = browser.process().spawnfile;
19-
await browser.close();
14+
cachedBrowserPath = puppeteer.executablePath();
2015
return cachedBrowserPath;
2116
};
2217

0 commit comments

Comments
 (0)