Skip to content

Commit

Permalink
Merge pull request #108 from noflo/coverage
Browse files Browse the repository at this point in the history
Add test coverage reporting
  • Loading branch information
bergie committed Oct 30, 2017
2 parents f4876c6 + 3360df1 commit 7091b9a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ components/*/
spec/*.xml
spec/runner.html
flowhub.json
/.nyc_output/
/coverage/
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ node_js:
- '6'
before_script:
- npm install -g grunt-cli
after_success:
- ./node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls
sudo: false
deploy:
provider: npm
Expand Down
5 changes: 4 additions & 1 deletion Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ module.exports = ->
src: ['spec/*.coffee']
options:
reporter: 'spec'
require: 'coffee-script/register'
require: [
'coffee-script/register'
'coffee-coverage/register-istanbul'
]
grep: process.env.TESTS

# BDD tests on browser
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# noflo-core [![Build Status](https://secure.travis-ci.org/noflo/noflo-core.png?branch=master)](http://travis-ci.org/noflo/noflo-core)
# noflo-core [![Build Status](https://secure.travis-ci.org/noflo/noflo-core.png?branch=master)](http://travis-ci.org/noflo/noflo-core) [![Coverage Status](https://coveralls.io/repos/github/noflo/noflo-core/badge.svg?branch=master)](https://coveralls.io/github/noflo/noflo-core?branch=master)

Essential components for NoFlo
33 changes: 10 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
},
"devDependencies": {
"chai": "^4.0.0",
"coffee-coverage": "^2.0.1",
"coffee-loader": "^0.7.2",
"coffee-script": "^1.10.0",
"coveralls": "^3.0.0",
"fbp-loader": "^0.1.1",
"fbp-spec": "^0.2.0",
"grunt": "^1.0.1",
Expand All @@ -47,33 +49,18 @@
"grunt-noflo-browser": "^1.4.0",
"json-loader": "^0.5.4",
"mocha": "^4.0.0",
"noflo-nodejs": "0.x >= 0.8"
"noflo-nodejs": "0.x >= 0.8",
"nyc": "^11.2.1"
},
"keywords": [
"noflo"
],
"noflo": {
"components": {
"Callback": "components/Callback.coffee",
"Copy": "components/Copy.coffee",
"DisconnectAfterPacket": "components/DisconnectAfterPacket.coffee",
"Drop": "components/Drop.coffee",
"Kick": "components/Kick.coffee",
"MakeFunction": "components/MakeFunction.coffee",
"Merge": "components/Merge.coffee",
"Output": "components/Output.coffee",
"ReadEnv": "components/ReadEnv.coffee",
"ReadGlobal": "components/ReadGlobal.coffee",
"Repeat": "components/Repeat.coffee",
"RepeatAsync": "components/RepeatAsync.coffee",
"RepeatDelayed": "components/RepeatDelayed.coffee",
"RunInterval": "components/RunInterval.coffee",
"RunTimeout": "components/RunTimeout.coffee",
"SendNext": "components/SendNext.coffee",
"Split": "components/Split.coffee"
}
},
"scripts": {
"test": "grunt test"
"test": "nyc grunt test"
},
"nyc": {
"include": [
"components/*.coffee"
]
}
}

0 comments on commit 7091b9a

Please sign in to comment.