Skip to content

Commit

Permalink
refactor(karma): start chrome headless without sandbox
Browse files Browse the repository at this point in the history
This is required by Travis to run our tests in the containerized
environment.
  • Loading branch information
mbroadst committed Jul 12, 2018
1 parent eaae49e commit 8fd95db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ cache:
directories:
- node_modules

before_script:
- "sudo chown root /opt/google/chrome/chrome-sandbox"
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"

script:
- npm run-script test-node
- if [[ $(node --version) != v4* ]] ; then npm run-script test-browser; fi
11 changes: 7 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ const onwarn = warning => {

rollupConfig.onwarn = onwarn;

// Karma configuration
// Generated on Thu Jun 28 2018 14:24:01 GMT-0400 (EDT)

module.exports = function(config) {
config.set({
basePath: '',
Expand All @@ -56,7 +53,13 @@ module.exports = function(config) {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadless'],
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
singleRun: true,
concurrency: Infinity
});
Expand Down

0 comments on commit 8fd95db

Please sign in to comment.