Last active
March 20, 2020 00:39
-
-
Save Qarun-Qadir-Bissoondial/b886ff67735556106420bca2b40d98ce to your computer and use it in GitHub Desktop.
Updated default karma.conf.js to include Headless Chrome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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