diff options
Diffstat (limited to 'karma.conf.js')
-rw-r--r-- | karma.conf.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000..403490a --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,45 @@ + + +// 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'), + require('karma-jasmine-html-reporter'), + require('@angular-devkit/build-angular/plugins/karma'), + require('karma-spec-reporter'), + require('karma-firefox-launcher'), + require('karma-chrome-launcher'), + require('karma-sonarqube-unit-reporter'), + require('karma-coverage'), + ], + client: { + clearContext: true, // leave Jasmine Spec Runner output visible in browser + }, + coverageReporter: { + dir: require('path').join(__dirname, './coverage'), + reports: ['html', 'lcovonly', 'text-summary'], + fixWebpackSourcePaths: true, + }, + sonarQubeUnitReporter: { + sonarQubeVersion: 'LATEST', + outputFile: 'reports/ut_report.xml', + overrideTestDescription: true, + testPaths: ['./src'], + testFilePattern: '.spec.ts', + useBrowserName: false + }, + reporters: ['progress', 'coverage','spec', 'kjhtml', 'sonarqubeUnit'], + port: 4200, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['FirefoxHeadless, ChromiumHeadless', 'Firefox'], + singleRun: true, + restartOnFileChange: true, + }); +}; |