From 8e9433a218a34562b1c0f6db13c4e336b24f8299 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 31 May 2017 13:34:40 +1200 Subject: [PATCH] Add code coverage --- .gitignore | 1 + package.json | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 62562b7..7fc04fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ coverage node_modules +.nyc_output diff --git a/package.json b/package.json index 0402c81..7ac2245 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,18 @@ "zcash" ], "scripts": { + "coverage-report": "nyc report --reporter=lcov", + "coverage-html": "nyc report --reporter=html", + "coverage": "nyc --check-coverage --branches 90 --functions 90 mocha", "integration": "mocha test/integration/", "prepublish": "npm run test", "standard": "standard", - "test": "npm run standard && npm run unit", + "test": "npm run standard && npm run coverage", "unit": "mocha" }, "devDependencies": { "mocha": "3.4.2", + "nyc": "10.3.2", "standard": "10.0.2" } }