diff --git a/.gitignore b/.gitignore index 3c3629e..7680b7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ node_modules +coverage/ +npm-debug.log diff --git a/.travis.yml b/.travis.yml index 587bd3e..1b52e31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1 +1,3 @@ language: node_js +after_success: + - npm run test-cov diff --git a/package.json b/package.json index f127be3..61d5ef5 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "bot" ], "scripts": { - "test": "./node_modules/.bin/mocha test/index.js" + "test": "./node_modules/.bin/mocha test/index.js", + "test-cov": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" }, "author": "Yago Pérez ", "license": "MIT", @@ -24,7 +25,10 @@ "request": "^2.58.0" }, "devDependencies": { + "coveralls": "^2.11.2", + "istanbul": "^0.3.17", "mocha": "^2.2.5", + "mocha-lcov-reporter": "0.0.2", "should": "^7.0.1" } }