From 2abac00661f29052d4819721e6809b671340ce19 Mon Sep 17 00:00:00 2001 From: olusegun odunukan Date: Mon, 27 Nov 2023 14:14:08 +0000 Subject: [PATCH] Update karma.conf.js --- .../ccd-case-ui-toolkit/src/karma.conf.js | 57 ++++++++----------- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/projects/ccd-case-ui-toolkit/src/karma.conf.js b/projects/ccd-case-ui-toolkit/src/karma.conf.js index e29d6791fe..31f40cb65e 100644 --- a/projects/ccd-case-ui-toolkit/src/karma.conf.js +++ b/projects/ccd-case-ui-toolkit/src/karma.conf.js @@ -2,61 +2,52 @@ // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html -module.exports = function(config) { - +module.exports = function (config) { config.set({ - defaultTimeoutInterval: 60000, - browserNoActivityTimeout: 60000, - browserDisconnectTimeout: 60000, basePath: '', - frameworks: ['parallel', 'jasmine', '@angular-devkit/build-angular'], - parallelOptions: { - executors: 1, - shardStrategy: 'round-robin' - }, + frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), - require('karma-parallel'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-spec-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma'), - require('karma-sonarqube-unit-reporter') + require('karma-coverage'), + require('@angular-devkit/build-angular/plugins/karma') ], client: { - clearContext: false, // leave Jasmine Spec Runner output visible in browser - jasmine: { + jasmine:{ random: false, - verboseDeprecations: true, - } + }, + clearContext: false, // leave Jasmine Spec Runner output visible in browser }, - coverageIstanbulReporter: { + jasmineHtmlReporter: { + suppressAll: true // removes the duplicated traces + }, + coverageReporter: { dir: require('path').join(__dirname, '../../../coverage/ccd-case-ui-toolkit'), subdir: '.', reporters: [ { type: 'html', subdir: 'html-report' }, - { type: 'lcov', subdir: 'lcov-report' } + { type: 'lcov' } ], - fixWebpackSourcePaths: true, - combineBrowserReports: true - }, - reporters: ['spec', 'progress', 'kjhtml', 'coverage-istanbul'], - specReporter: { - maxLogLines: 5, // limit number of lines logged per test - suppressErrorSummary: false,// do not print error summary - suppressFailed: false, // do not print information about failed tests - suppressPassed: false, // do not print information about passed tests - suppressSkipped: true, // do not print information about skipped tests - showSpecTiming: false, // print the time elapsed for each spec - failFast: false // test would finish with error when a first fail occurs. + fixWebpackSourcePaths: true }, + defaultTimeoutInterval: 60000, + browserNoActivityTimeout: 60000, + browserDisconnectTimeout: 60000, + reporters: ['spec', 'progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['ChromeHeadless'], + customLaunchers: { + ChromeHeadlessCI: { + base: 'ChromeHeadless', + flags: ['--no-sandbox'] + } + }, singleRun: true, restartOnFileChange: true }); -}; +}; \ No newline at end of file