Skip to content

Commit

Permalink
test: Support code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jessy1092 committed Feb 29, 2016
1 parent 0295f7b commit c2c58eb
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
coverage/
6 changes: 5 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# node
node_modules/

# Else
# test
coverage/
specs/

# else
.editorconfig
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ branches:

script:
- "npm test"

after_script:
- cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NIME
=============
[![npm][npm-image]][npm-url] [![Build Status][travis-ci-image]][travis-ci-url]
[![npm][npm-image]][npm-url] [![Build Status][travis-ci-image]][travis-ci-url] [![Coveralls][coveralls-img]][coveralls-url]

Implement input methods easily for Windows with nodejs. It is another [PIME](https://github.com/EasyIME/PIME) server side.

Expand Down Expand Up @@ -112,3 +112,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[travis-ci-image]: https://img.shields.io/travis/EasyIME/NIME.svg?style=flat-square
[travis-ci-url]: https://travis-ci.org/EasyIME/NIME

[coveralls-img]: https://img.shields.io/coveralls/EasyIME/nime.svg?style=flat-square
[coveralls-url]: https://coveralls.io/github/EasyIME/nime
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"start": "cd example && node index.js",
"test": "mocha specs --ui bdd --require specs/helpers/chai.js --reporter spec"
"test": "istanbul cover -x specs/** ./node_modules/mocha/bin/_mocha specs -- --require specs/helpers/chai.js --reporter spec"
},
"author": "Lee <jessy1092@gmail.com>",
"license": "MIT",
Expand All @@ -21,6 +21,8 @@
},
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.8",
"istanbul": "^0.4.2",
"mocha": "^2.4.5",
"sinon": "^1.17.3"
}
Expand Down

0 comments on commit c2c58eb

Please sign in to comment.