Skip to content

Commit ee2fb17

Browse files
authored
Merge pull request element-hq#4765 from vector-im/rav/karma-bits
Karma tweaks for riot-web
2 parents 0b2120e + 06ef674 commit ee2fb17

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

‎karma.conf.js‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,23 @@ module.exports = function (config) {
8484
// available preprocessors:
8585
// https://npmjs.org/browse/keyword/karma-preprocessor
8686
preprocessors: {
87-
'{src,test}/**/*.js': ['webpack'],
87+
'{src,test}/**/*.js': ['webpack', 'sourcemap'],
8888
},
8989

9090
// test results reporter to use
91-
// possible values: 'dots', 'progress'
9291
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
93-
reporters: ['progress', 'junit'],
92+
reporters: ['logcapture', 'spec', 'junit', 'summary'],
93+
94+
specReporter: {
95+
suppressErrorSummary: false, // do print error summary
96+
suppressFailed: false, // do print information about failed tests
97+
suppressPassed: false, // do print information about passed tests
98+
showSpecTiming: true, // print the time elapsed for each spec
99+
},
100+
101+
client: {
102+
captureLogs: true,
103+
},
94104

95105
// web server port
96106
port: 9876,

‎package.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,15 @@
114114
"fs-extra": "^0.30.0",
115115
"html-webpack-plugin": "^2.24.0",
116116
"json-loader": "^0.5.3",
117-
"karma": "^0.13.22",
117+
"karma": "^1.7.0",
118118
"karma-chrome-launcher": "^0.2.3",
119119
"karma-cli": "^0.1.2",
120120
"karma-junit-reporter": "^0.4.1",
121+
"karma-logcapture-reporter": "0.0.1",
121122
"karma-mocha": "^0.2.2",
123+
"karma-sourcemap-loader": "^0.3.7",
124+
"karma-spec-reporter": "0.0.31",
125+
"karma-summary-reporter": "^1.3.3",
122126
"karma-webpack": "^1.7.0",
123127
"matrix-mock-request": "^1.2.0",
124128
"matrix-react-test-utils": "^0.2.0",

0 commit comments

Comments
 (0)