Skip to content

Commit

Permalink
fix chrome headless issue when running as root
Browse files Browse the repository at this point in the history
  • Loading branch information
art-in committed Jun 26, 2019
1 parent c67655b commit cb34de1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tasks/utils/run-unit-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const KarmaServer = require('karma').Server;
*/
function runUnitTests(opts) {
return new Promise(function(resolve) {
let chrome = 'ChromeHeadless';
let chrome = 'ChromeHeadlessNoSandbox';

if (require('os').platform() === 'win32') {
// TODO: karma cannot capture headless chrome in windows 7,
Expand Down Expand Up @@ -47,6 +47,13 @@ function runUnitTests(opts) {
stats: 'errors-only'
},

customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},

browsers: [chrome],

frameworks: ['mocha'],
Expand Down

0 comments on commit cb34de1

Please sign in to comment.