diff --git a/.gitignore b/.gitignore index c2658d7..25fbf5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules/ +coverage/ diff --git a/.npmignore b/.npmignore index c73bfbc..5c0673e 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,9 @@ # node node_modules/ -# Else +# test +coverage/ +specs/ + +# else .editorconfig diff --git a/.travis.yml b/.travis.yml index 4126955..a46098d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,3 +23,6 @@ branches: script: - "npm test" + +after_script: + - cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js diff --git a/README.md b/README.md index 56a0783..c370f8c 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 diff --git a/package.json b/package.json index da798f0..b84a44f 100644 --- a/package.json +++ b/package.json @@ -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 ", "license": "MIT", @@ -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" }