Skip to content

Commit 4543be9

Browse files
wardbellfilipesilva
authored andcommitted
feat(@angular/cli): extend karma.conf.js w/ kjhtml reporter
karma-jasmine-html-reporter (kjhtml) displays Jasmine test runner in the test browser. Close #4567
1 parent 26b1ee4 commit 4543be9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/@angular/cli/blueprints/ng2/files/karma.conf.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ module.exports = function (config) {
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
1112
require('karma-coverage-istanbul-reporter'),
1213
require('@angular/cli/plugins/karma')
1314
],
15+
client:{
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
1418
files: [
1519
{ pattern: './<%= sourceDir %>/test.ts', watched: false }
1620
],
@@ -30,7 +34,7 @@ module.exports = function (config) {
3034
},
3135
reporters: config.angularCli && config.angularCli.codeCoverage
3236
? ['progress', 'coverage-istanbul']
33-
: ['progress'],
37+
: ['progress', 'kjhtml'],
3438
port: 9876,
3539
colors: true,
3640
logLevel: config.LOG_INFO,

packages/@angular/cli/blueprints/ng2/files/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"karma-chrome-launcher": "~2.0.0",
3737
"karma-cli": "~1.0.1",
3838
"karma-jasmine": "~1.1.0",
39+
"karma-jasmine-html-reporter": "^0.2.2",
3940
"karma-coverage-istanbul-reporter": "^0.2.0",
4041
"protractor": "~5.1.0",
4142
"ts-node": "~2.0.0",

0 commit comments

Comments
 (0)