Skip to content

Commit

Permalink
feat(@angular/cli): extend karma.conf.js w/ kjhtml reporter
Browse files Browse the repository at this point in the history
karma-jasmine-html-reporter (kjhtml) displays Jasmine test runner in the test browser.

Close angular#4567
  • Loading branch information
wardbell authored and Zhicheng Wang committed Mar 16, 2017
1 parent fb2c60d commit 4a108a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/@angular/cli/blueprints/ng2/files/karma.conf.js
Expand Up @@ -8,9 +8,13 @@ module.exports = function (config) {
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
files: [
{ pattern: './<%= sourceDir %>/test.ts', watched: false }
],
Expand All @@ -30,7 +34,7 @@ module.exports = function (config) {
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'coverage-istanbul']
: ['progress'],
: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand Down
1 change: 1 addition & 0 deletions packages/@angular/cli/blueprints/ng2/files/package.json
Expand Up @@ -36,6 +36,7 @@
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-coverage-istanbul-reporter": "^0.2.0",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
Expand Down

0 comments on commit 4a108a7

Please sign in to comment.