[ACS-4865] setup and enable code coverage for all projects (#3074)

This commit is contained in:
Denys Vuika
2023-03-20 09:06:19 -04:00
committed by GitHub
parent 86c0bbb998
commit 9609393d1e
37 changed files with 1300 additions and 408 deletions

View File

@@ -1,32 +1,15 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
const { join } = require('path');
const getBaseKarmaConfig = require('../../karma.conf');
module.exports = function (config) {
const baseConfig = getBaseKarmaConfig();
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-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
...baseConfig,
coverageReporter: {
...baseConfig.coverageReporter,
dir: join(__dirname, '../../coverage/aca-preview'),
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/aca-preview'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: true,
restartOnFileChange: true
});
};