Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit 223e893

Browse files
committed
Adding jscoverage library to package.json. Additional code coverage commands in the Makefile.
1 parent d069d91 commit 223e893

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ test:
88
lint:
99
@node_modules/.bin/jshint lib/client.js lib/scp.js index.js bin/scp2
1010

11-
out = _site/coverage.html
11+
out_dir = _site
12+
out_file = ${out_dir}/coverage.html
13+
1214
coverage:
15+
@mkdir -p ${out_dir}
1316
@rm -fr lib-cov
14-
@jscoverage lib lib-cov
15-
@NICO_COVERAGE=1 $(MAKE) test reporter=html-cov > ${out}
17+
@node_modules/.bin/jscoverage lib lib-cov
18+
@NICO_COVERAGE=1 $(MAKE) test opts=lib-cov reporter=html-cov --no-print-directory > ${out_file}
1619
@echo
1720
@rm -fr lib-cov
18-
@echo "Built Report to ${out}"
21+
@echo "Built Report to ${out_file}"
1922
@echo
2023

2124
clean:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"devDependencies": {
2828
"jshint": "*",
2929
"mocha": "*",
30-
"expect.js": "*"
30+
"expect.js": "*",
31+
"jscoverage": "^0.5.9"
3132
},
3233
"bin": {
3334
"scp2": "bin/scp2"

0 commit comments

Comments
 (0)