Skip to content

Commit

Permalink
fix: use karma-coverage instead of karma-coverage-istanbul-reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
michelherv authored and just-jeb committed Mar 4, 2021
1 parent 79894c2 commit 6c2ea5b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 16 deletions.
23 changes: 16 additions & 7 deletions packages/custom-webpack/examples/full-cycle-app/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,36 @@ 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/append-webpack-plugins'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
coverageReporter: {
dir: path.join(__dirname, 'coverage', 'append-webpack-plugins'),
subdir: '.',
reporters: [
{ type: 'text-summary' },
{ type: 'html', subdir: 'html' },
{ type: 'lcovonly' },
{ type: 'json' },
],
},
reporters: ['progress', 'kjhtml'],
reporters: ['progress', 'kjhtml', 'coverage'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
flags: ['--disable-translate', '--disable-extensions'],
browsers: ['Chrome'],
browserConsoleLogOptions: {
terminal: false,
},
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
flags: ['--no-sandbox', '--disable-gpu', '--disable-translate', '--disable-extensions'],
},
},
singleRun: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.1",
"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",
"protractor": "~7.0.0",
Expand Down
23 changes: 16 additions & 7 deletions packages/custom-webpack/examples/sanity-app/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,36 @@ 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/sanity-app'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true,
coverageReporter: {
dir: path.join(__dirname, 'coverage', 'append-webpack-plugins'),
subdir: '.',
reporters: [
{ type: 'text-summary' },
{ type: 'html', subdir: 'html' },
{ type: 'lcovonly' },
{ type: 'json' },
],
},
reporters: ['progress', 'kjhtml'],
reporters: ['progress', 'kjhtml', 'coverage'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
flags: ['--disable-translate', '--disable-extensions'],
browsers: ['Chrome'],
browserConsoleLogOptions: {
terminal: false,
},
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: ['--no-sandbox'],
flags: ['--no-sandbox', '--disable-gpu', '--disable-translate', '--disable-extensions'],
},
},
singleRun: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/custom-webpack/examples/sanity-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.1",
"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",
"protractor": "~7.0.0",
Expand Down

0 comments on commit 6c2ea5b

Please sign in to comment.