diff --git a/.gitignore b/.gitignore index b512c09d..c472e3c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -node_modules \ No newline at end of file +node_modules +coverage +.nyc_output +coverage.lcov diff --git a/circle.yml b/circle.yml index 645b3627..8b76b038 100644 --- a/circle.yml +++ b/circle.yml @@ -18,3 +18,5 @@ test: - nvm use 4; npm rebuild &> /dev/null; npm run testci - nvm use 6; npm rebuild &> /dev/null; npm run testci - nvm use 8; npm rebuild &> /dev/null; npm run testci + post: + - npm run report-coverage diff --git a/package.json b/package.json index 11b8584c..9378f581 100644 --- a/package.json +++ b/package.json @@ -23,10 +23,11 @@ ], "scripts": { "size": "size-limit", - "test": "standard && ava", - "testci": "standard && ava && npm run size", + "test": "standard && nyc ava --tap", + "testci": "standard && nyc ava --tap && npm run size", "prepublish": "npm run check-deps", - "check-deps": "nsp check" + "check-deps": "nsp check", + "report-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov" }, "files": [ "index.js", @@ -55,9 +56,11 @@ "ava": "^0.24.0", "basic-auth": "^2.0.0", "body-parser": "^1.17.1", + "codecov": "^3.0.0", "delay": "^2.0.0", "express": "^4.15.2", "nsp": "^3.1.0", + "nyc": "^11.4.1", "pify": "^3.0.0", "sinon": "^4.1.3", "standard": "^10.0.3",