Skip to content
This repository was archived by the owner on Jun 14, 2019. It is now read-only.

Commit 3e3c6ab

Browse files
committed
chore: re-enable coverage test
1 parent b49af45 commit 3e3c6ab

File tree

4 files changed

+157
-16
lines changed

4 files changed

+157
-16
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ before_script:
1212
- sh -e /etc/init.d/xvfb start
1313

1414
after_script:
15-
- if [ "$TEST_SCOPE" == "" ]; then npm install -g codeclimate-test-reporter && codeclimate-test-reporter < build/coverage/report/lcov.info; fi
15+
- if [ "$TEST_SCOPE" == "" ]; then npm install -g codeclimate-test-reporter && codeclimate-test-reporter < build/coverage/lcov.info; fi
1616

1717
env:
1818
matrix:

karma.conf.js

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ module.exports = function (config) {
156156
reporters : (() => {
157157
let reporters = ['progress'];
158158
if (isDefaultScope(scope)) {
159-
reporters.push('coverage');
159+
reporters.push('coverage-istanbul');
160160
}
161161
if (sourcelabsConfig.enabled) {
162162
reporters.push('saucelabs');
@@ -226,17 +226,22 @@ module.exports = function (config) {
226226
plugins : ['transform-runtime'],
227227
},
228228
},
229-
// {
230-
// enforce : 'pre',
231-
// test : /\.js$/,
232-
// include : [
233-
// path.resolve('src/')
234-
// ],
235-
// exclude : [
236-
// /(node_modules|bower_components)/,
237-
// ],
238-
// loader : 'babel-istanbul-loader',
239-
// },
229+
{
230+
enforce : 'post',
231+
test : /\.js$/,
232+
use: {
233+
loader : 'istanbul-instrumenter-loader',
234+
options : {
235+
esModules : true,
236+
},
237+
},
238+
include : [
239+
path.resolve('src/')
240+
],
241+
exclude : [
242+
/(node_modules|bower_components)/,
243+
],
244+
},
240245
{
241246
test : /vertx-eventbus\.js$/,
242247
loader : 'imports-loader',
@@ -261,12 +266,19 @@ module.exports = function (config) {
261266
noInfo : true
262267
},
263268

264-
coverageReporter : (() => {
269+
coverageIstanbulReporter : (() => {
265270
if (isDefaultScope(scope)) {
266271
return {
272+
fixWebpackSourcePaths: true,
273+
reports: [
274+
'text-summary',
275+
'lcovonly',
276+
],
267277
dir : 'build/coverage',
268-
subdir : 'report',
269-
type : 'lcov'
278+
lcovonly: {
279+
subdir : 'report',
280+
type : 'lcov',
281+
},
270282
};
271283
}
272284
})(),

package-lock.json

Lines changed: 128 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"karma-babel-preprocessor": "^6.0.1",
8383
"karma-chrome-launcher": "^2.0.0",
8484
"karma-coverage": "^1.0.0",
85+
"karma-coverage-istanbul-reporter": "^1.3.0",
8586
"karma-expect": "~1.1.3",
8687
"karma-firefox-launcher": "~1.0.0",
8788
"karma-jasmine": "^1.1.0",

0 commit comments

Comments
 (0)