Skip to content

Commit

Permalink
Merge pull request #91 from wikimedia/coverage
Browse files Browse the repository at this point in the history
Add code coverage reporting
  • Loading branch information
Marko Obrovac committed Dec 23, 2014
2 parents 1617e18 + 176a2d8 commit 966dbe7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coverage/
config.yaml
node_modules
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ before_script:
notifications:
email:
- services@wikimedia.org

script: npm run-script coverage
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[![build status](https://travis-ci.org/wikimedia/restbase.svg)](https://travis-ci.org/wikimedia/restbas://travis-ci.org/wikimedia/restbase)
[![coverage status](https://coveralls.io/repos/wikimedia/restbase/badge.png)](https://coveralls.io/r/wikimedia/restbase)

# RESTBase

[REST content
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "REST storage and service dispatcher",
"main": "server.js",
"scripts": {
"test": "sh test/utils/cleandb.sh && mocha"
"test": "sh test/utils/cleandb.sh && mocha",
"coverage": "sh test/utils/cleandb.sh && istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -48,6 +49,9 @@
"devDependencies": {
"mocha": "~1.x.x",
"mocha-jshint": "0.0.9",
"heapdump": "~0.3.3"
"heapdump": "~0.3.3",
"istanbul": "0.3.5",
"mocha-lcov-reporter": "0.0.1",
"coveralls": "2.11.2"
}
}
2 changes: 1 addition & 1 deletion test/features/pagecontent/pagecontent.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = function (config) {
});
});
it('should create a new html revision using proxy handler with id 624484444', function() {
this.timeout(20000);
this.timeout(40000);
return preq.put({
uri: config.baseURL + '/test/Foo/wikitext/624484444',
headers: { 'content-type': 'text/html' },
Expand Down

0 comments on commit 966dbe7

Please sign in to comment.