Skip to content

Commit

Permalink
Update karma config
Browse files Browse the repository at this point in the history
  • Loading branch information
MurhafSousli committed Aug 28, 2021
1 parent 963112c commit cf52efe
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 61 deletions.
24 changes: 18 additions & 6 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,28 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/ngx-highlight'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
Expand All @@ -36,7 +48,7 @@ module.exports = function (config) {
restartOnFileChange: true,
capabilities: {
chromeOptions: {
args: [ "--headless" ]
args: ["--headless"]
},
'browserName': 'chrome'
},
Expand Down
78 changes: 29 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.3",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-coverage": "^2.0.3",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^12.0.2",
Expand Down
13 changes: 8 additions & 5 deletions projects/ngx-highlightjs/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/ngx-higlightjs'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/ngx-highlightjs'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
Expand Down

0 comments on commit cf52efe

Please sign in to comment.