diff --git a/.gitignore b/.gitignore index 93f1361..648ea07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules +coverage npm-debug.log diff --git a/.travis.yml b/.travis.yml index 4909f83..d00b71f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ language: node_js node_js: - "6" +script: "npm run-script coverage" +after_script: "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" diff --git a/package.json b/package.json index 32c63ae..d20c4cf 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "Natural language handling for commands and intents", "main": "index.js", "scripts": { - "test": "node_modules/.bin/mocha test/*.test.js && node_modules/.bin/eslint *.js language/*.js resolver/*.js values/*.js" + "test": "node_modules/.bin/mocha test/*.test.js && node_modules/.bin/eslint *.js language/*.js resolver/*.js values/*.js", + "coverage": "node_modules/istanbul/lib/cli.js cover node_modules/mocha/bin/_mocha -- -R spec ./test/*.test.js" }, "license": "MIT", "repository": "aholstenson/ecolect-js", @@ -30,8 +31,10 @@ "chai-as-promised": "^6.0.0", "chalk": "^1.1.3", "cli-autocomplete": "^0.4.0", + "coveralls": "^2.11.15", "eslint": "^3.13.0", "eslint-plugin-node": "^3.0.5", + "istanbul": "^0.4.5", "mocha": "^3.2.0", "regenerate": "^1.3.2", "unicode-9.0.0": "^0.7.0"