From e5353c9bf77f7f596bb0710e975db7beeb87b586 Mon Sep 17 00:00:00 2001 From: FG Ribreau Date: Mon, 11 Apr 2016 08:52:37 +0200 Subject: [PATCH] feat(coverage): added coverage --- .gitignore | 1 + package.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 318932a..1d7bbc9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ docs/redsmin-proxy-announcment.pxm test/docs.html test/file.xml private/ +test/coverage diff --git a/package.json b/package.json index 157e840..651c55b 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ }, "scripts": { "start": "node ./bin/redsmin", - "test": "multi='spec=- xunit=test/file.xml doc=test/docs.html' mocha -t 5000 -R mocha-multi lib/**.test.js", + "test": "multi='spec=- xunit=test/file.xml doc=test/docs.html' nyc --all --statements=77 --lines=77 --functions=70 --branches=57 --check-coverage --reporter=lcov --reporter=cobertura --report-dir=test/coverage -- mocha -t 5000 -R mocha-multi lib/**.test.js", + "test-watch": "multi='spec=- xunit=test/file.xml doc=test/docs.html' mocha -w -t 10000 -g 'should handle async connect disconnect' -R mocha-multi lib/**.test.js", "changelog": "github-changes --use-commit-body --order-semver --o $(node -p 'process.env.npm_package_repository_url.split(\"/\")[3];') --r $(node -p 'a=process.env.npm_package_repository_url.split(\"/\");a[a.length-1].split(\".\")[0]') --token $CHANGELOG_GITHUB_TOKEN_FG -f CHANGELOG.md", "changelog-git": "npm run changelog && git add CHANGELOG.md && git commit -m 'docs(changelog): updated' && git push origin master", "check-build": "check-build" @@ -51,6 +52,7 @@ "mocha": "^2.2.1", "mocha-multi": "^0.6.0", "nodeunit": "~0.7.4", + "nyc": "^6.4.0", "sinon": "^1.14.1" }, "engines": {