From 8fd95db8f78cea4aed19a64392cf54581bf98c31 Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Thu, 12 Jul 2018 09:15:22 -0400 Subject: [PATCH] refactor(karma): start chrome headless without sandbox This is required by Travis to run our tests in the containerized environment. --- .travis.yml | 4 ---- karma.conf.js | 11 +++++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0c15bd5..8f0b3eb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/karma.conf.js b/karma.conf.js index e2b8dbce..c895a98d 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -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: '', @@ -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 });