Skip to content
This repository has been archived by the owner on Dec 19, 2017. It is now read-only.

Commit

Permalink
Merge pull request #12 from caseyWebb/fix-coverage-reporting
Browse files Browse the repository at this point in the history
Fix CodeClimate coverage reporting
  • Loading branch information
caseyWebb committed Jan 5, 2016
2 parents 80a2524 + 8e51d3b commit ed147c0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ before_script:
- sh -e /etc/init.d/xvfb start

after_script:
- node node_modules/codeclimate-test-reporter/bin/codeclimate.js < coverage/lcov.txt
- codeclimate-test-reporter < coverage/lcov.txt
8 changes: 5 additions & 3 deletions karma.travis.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ module.exports = function(config) {
reporters: ['dots', 'coverage'],

coverageReporter: {
type: 'lcovonly',
dir: 'coverage/',
file: 'lcov.txt'
dir : 'coverage/',
reporters: [
{ type: 'html', subdir: 'html' },
{ type: 'lcovonly', subdir: '.', file: 'lcov.txt' }
]
},

webpack: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"babel-loader": "^6.2.0",
"babel-preset-es2015": "^6.1.18",
"bootstrap": "^3.3.6",
"codeclimate-test-reporter": "^0.1.1",
"css-loader": "^0.23.0",
"es6-promise": "^3.0.2",
"escape-html": "^1.0.3",
Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function runTests(t, config) {
.step((done) => {
const foo = router.query.get('foo', 'foo')
t.equal(foo(), 'bar', 'querystring param is writeable')
t.ok(window.location.href.indexOf('%5Bfoo%5D=bar') > -1, 'non-default params are written to the querystring')
t.ok(decodeURIComponent(window.location.href).indexOf('[foo]=bar') > -1, 'non-default params are written to the querystring')

const killMe = foo.subscribe(() => {
t.equal(router.query.get('foo')(), 'foo', 'ctx.query.clear sets the params to defaults')
Expand Down Expand Up @@ -168,7 +168,7 @@ function runTests(t, config) {
.step(() => {
const activeLink = $('#should-be-active', dom)
t.ok(activeLink.hasClass('active-path'), 'path binding sets `active` class')

resolve()
})
})
Expand Down

0 comments on commit ed147c0

Please sign in to comment.