61 lines
1.9 KiB
JavaScript

// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
const {join} = require('path');
const {constants} = require('karma');
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-mocha-reporter')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
mochaReporter: {
ignoreSkipped: process.env?.KARMA_IGNORE_SKIPPED === 'true'
},
coverageReporter: {
dir: join(__dirname, './coverage/extensions'),
subdir: '.',
reporters: [{type: 'html'}, {type: 'text-summary'}],
check: {
global: {
statements: 75,
branches: 65,
functions: 73,
lines: 75
}
}
},
reporters: ['mocha', 'kjhtml'],
port: 9876,
colors: true,
logLevel: constants.LOG_INFO,
autoWatch: true,
browsers: ['ChromeHeadless'],
customLaunchers: {
ChromeHeadless: {
base: 'Chrome',
flags: [
'--no-sandbox',
'--headless',
'--disable-gpu',
'--remote-debugging-port=9222'
]
}
},
singleRun: true
});
};