Skip to content

Commit

Permalink
Prevent empty browser startup windows during test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Oct 5, 2022
1 parent 061023f commit aece8dd
Showing 1 changed file with 13 additions and 5 deletions.
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
}
}

0 comments on commit aece8dd

Please sign in to comment.