Skip to content

Instantly share code, notes, and snippets.

@Qarun-Qadir-Bissoondial
Last active March 20, 2020 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qarun-Qadir-Bissoondial/b886ff67735556106420bca2b40d98ce to your computer and use it in GitHub Desktop.
Save Qarun-Qadir-Bissoondial/b886ff67735556106420bca2b40d98ce to your computer and use it in GitHub Desktop.
Updated default karma.conf.js to include Headless Chrome
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-firefox-launcher'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
'karma-spec-reporter'
],
client: {
clearContext: false
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/crew-app'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromiumNoSandbox', 'Chrome'],
customLaunchers: {
ChromiumNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-translate', '--disable-extensions']
}
},
singleRun: false,
restartOnFileChange: true,
browserNoActivityTimeout: 999999
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment