Skip to content

Commit 8fd95db

Browse files
committed
refactor(karma): start chrome headless without sandbox
This is required by Travis to run our tests in the containerized environment.
1 parent eaae49e commit 8fd95db

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ cache:
1313
directories:
1414
- node_modules
1515

16-
before_script:
17-
- "sudo chown root /opt/google/chrome/chrome-sandbox"
18-
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
19-
2016
script:
2117
- npm run-script test-node
2218
- if [[ $(node --version) != v4* ]] ; then npm run-script test-browser; fi

karma.conf.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ const onwarn = warning => {
3939

4040
rollupConfig.onwarn = onwarn;
4141

42-
// Karma configuration
43-
// Generated on Thu Jun 28 2018 14:24:01 GMT-0400 (EDT)
44-
4542
module.exports = function(config) {
4643
config.set({
4744
basePath: '',
@@ -56,7 +53,13 @@ module.exports = function(config) {
5653
colors: true,
5754
logLevel: config.LOG_INFO,
5855
autoWatch: true,
59-
browsers: ['ChromeHeadless'],
56+
browsers: ['ChromeHeadlessNoSandbox'],
57+
customLaunchers: {
58+
ChromeHeadlessNoSandbox: {
59+
base: 'ChromeHeadless',
60+
flags: ['--no-sandbox']
61+
}
62+
},
6063
singleRun: true,
6164
concurrency: Infinity
6265
});

0 commit comments

Comments
 (0)