Skip to content

Commit

Permalink
switch to Chrome-Headless in karma config
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Sturm committed May 17, 2017
1 parent 182fbce commit 49feae0
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ module.exports = function(config) {
// frameworks to use
frameworks: ['jasmine'],

plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
],

// list of files / patterns to load in the browser
files: [
'tests/*.js'
Expand Down Expand Up @@ -43,7 +48,20 @@ module.exports = function(config) {
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['PhantomJS'],
browsers: ['ChromeNoSandboxHeadless'],
customLaunchers: {
ChromeNoSandboxHeadless: {
base: 'Chromium',
flags: [
'--no-sandbox',
// See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
'--headless',
'--disable-gpu',
// Without a remote debugging port, Google Chrome exits immediately.
' --remote-debugging-port=9222'
]
}
},

// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
Expand Down

0 comments on commit 49feae0

Please sign in to comment.