Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spruce up Puppeteer usage to stop timeouts, page conflicts etc #2897

Merged
merged 9 commits into from
Oct 6, 2022
Prev Previous commit
Prevent empty browser startup windows during test runs
  • Loading branch information
colinrotherham committed Oct 6, 2022
commit 3d885e7b81d4e1a6e5fe60a9368bc6440f995ad4
18 changes: 13 additions & 5 deletions jest-puppeteer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ module.exports = {
browserContext: 'incognito',
browserPerWorker: true,
launch: {
// we use --no-sandbox --disable-setuid-sandbox as a workaround for the
// 'No usable sandbox! Update your kernel' error
// see more https://github.com/Googlechrome/puppeteer/issues/290
args: [
/**
* Workaround for 'No usable sandbox! Update your kernel' error
* see more https://github.com/Googlechrome/puppeteer/issues/290
*/
'--no-sandbox',
'--disable-setuid-sandbox'
]
'--disable-setuid-sandbox',

/**
* Prevent empty Chromium startup window
* Tests use their own `browser.newPage()` instead
*/
'--no-startup-window'
],
waitForInitialPage: false
}
}