Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save avatsaev/58f07d870095c8fb0096cb7b1ac3746c to your computer and use it in GitHub Desktop.
Save avatsaev/58f07d870095c8fb0096cb7b1ac3746c to your computer and use it in GitHub Desktop.
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
browserNoActivityTimeout: 50000,
browserDisconnectTolerance: 2,
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'coverage-istanbul']
: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadless', 'Chrome'],
customLaunchers: {
ChromeHeadless: {
base: 'Chrome',
flags: [
'--headless',
'--disable-gpu',
'--no-sandbox',
'--remote-debugging-port=9222'
]
}
},
singleRun: false
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment