Last active
October 15, 2017 14:32
-
-
Save thescientist13/41e61c34e6a9e4b0e9e0b30a166b8cb6 to your computer and use it in GitHub Desktop.
Headless Chrome Karma configuration for NodeJS Dev Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1) from the terminal, install latest version of karma-chrome-launcher and puppeteer (yarn or npm) | |
// $ yarn add karma-chrome-launcher puppeteer --dev | |
// 2) in your Karam config | |
// https://github.com/karma-runner/karma-chrome-launcher#headless-chromium-with-puppeteer | |
process.env.CHROME_BIN = require('puppeteer').executablePath(); | |
const config = { | |
// start of your config | |
// ... | |
// https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322852784 | |
browsers: ['CustomChromeHeadless'], | |
customLaunchers: { | |
CustomChromeHeadless: { | |
base: 'ChromeHeadless', | |
flags: ['--no-sandbox', '--disable-setuid-sandbox'] | |
} | |
}, | |
// https://github.com/jasmine/jasmine/issues/1413#issuecomment-334247097 | |
captureTimeout: 210000, | |
browserDisconnectTolerance: 3, | |
browserDisconnectTimeout: 210000, | |
browserNoActivityTimeout: 210000, | |
// rest of your config | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment