Skip to content

Commit eac05a8

Browse files
author
Juan Gabriel Guzman
committed
test: #228 Improving readability on unit test report
1 parent b0ff656 commit eac05a8

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

karma.conf.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ module.exports = function (config) {
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
1212
require('karma-coverage-istanbul-reporter'),
13-
require('@angular-devkit/build-angular/plugins/karma')
13+
require('@angular-devkit/build-angular/plugins/karma'),
14+
require('karma-spec-reporter')
1415
],
1516
client: {
1617
clearContext: false // leave Jasmine Spec Runner output visible in browser
@@ -26,7 +27,16 @@ module.exports = function (config) {
2627
functions: 80
2728
}
2829
},
29-
reporters: ['progress', 'kjhtml'],
30+
reporters: ['spec', 'kjhtml'],
31+
specReporter: {
32+
maxLogLines: 5, // limit number of lines logged per test
33+
suppressErrorSummary: true, // do not print error summary
34+
suppressFailed: false, // do not print information about failed tests
35+
suppressPassed: false, // do not print information about passed tests
36+
suppressSkipped: true, // do not print information about skipped tests
37+
showSpecTiming: false // print the time elapsed for each spec
38+
},
39+
3040
port: 9876,
3141
colors: true,
3242
logLevel: config.LOG_INFO,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"commit-message-validator": "^0.1.11",
6060
"husky": "^4.2.3",
6161
"jasmine-core": "~3.5.0",
62-
"jasmine-spec-reporter": "~4.2.1",
62+
"karma-spec-reporter": "^0.0.32",
6363
"karma": "^5.0.1",
6464
"karma-chrome-launcher": "~3.1.0",
6565
"karma-coverage-istanbul-reporter": "~2.1.0",

0 commit comments

Comments
 (0)