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

Commit f85e276

Browse files
committed
Adding environment variable to Makefile to get coverage
1 parent 223e893 commit f85e276

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ coverage:
1515
@mkdir -p ${out_dir}
1616
@rm -fr lib-cov
1717
@node_modules/.bin/jscoverage lib lib-cov
18-
@NICO_COVERAGE=1 $(MAKE) test opts=lib-cov reporter=html-cov --no-print-directory > ${out_file}
18+
@SCP2_COVERAGE=1 $(MAKE) test opts=lib-cov reporter=html-cov --no-print-directory > ${out_file}
1919
@echo
2020
@rm -fr lib-cov
2121
@echo "Built Report to ${out_file}"

test/client.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
var client = require('../lib/client');
1+
var libpath = process.env['SCP2_COVERAGE'] ? '../lib-cov' : '../lib';
2+
3+
var client = require(libpath + '/client');
24
var expect = require('expect.js');
35

46
describe('Client', function() {

0 commit comments

Comments
 (0)