cic-staff-client/karma.conf.js

50 lines
1.5 KiB
JavaScript
Raw Normal View History

2020-10-30 16:16:05 +01:00
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
2020-11-25 11:26:00 +01:00
require('karma-junit-reporter'),
2020-10-30 16:16:05 +01:00
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
2020-11-25 15:58:36 +01:00
dir: require('path').join(__dirname, './coverage/cic-staff-client'),
2020-11-25 11:26:00 +01:00
reports: ['html', 'lcovonly', 'text-summary', 'cobertura'],
fixWebpackSourcePaths: true,
'report-config': {
'text-summary': {
file: 'text-summary.txt'
}
},
2020-10-30 16:16:05 +01:00
},
2020-11-25 11:26:00 +01:00
junitReporter: {
2020-11-25 15:58:36 +01:00
outputDir: require('path').join(__dirname, './tests/cic-staff-client'),
2020-11-25 11:26:00 +01:00
outputFile: 'junit-test-results.xml',
useBrowserName: false
},
reporters: ['progress', 'kjhtml', 'junit'],
2020-10-30 16:16:05 +01:00
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
2020-11-25 11:26:00 +01:00
restartOnFileChange: true,
customLaunchers: {
GitlabHeadlessChrome: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
},
},
2020-10-30 16:16:05 +01:00
});
};