File tree Expand file tree Collapse file tree 4 files changed +66
-0
lines changed
Expand file tree Collapse file tree 4 files changed +66
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ include $(TOOLS_MAKE_LIB_DIR)/test-browsers/Makefile
5151include $(TOOLS_MAKE_LIB_DIR ) /test-ci/Makefile
5252include $(TOOLS_MAKE_LIB_DIR ) /test-cov/Makefile
5353include $(TOOLS_MAKE_LIB_DIR ) /tools-test/Makefile
54+ include $(TOOLS_MAKE_LIB_DIR ) /tools-test-cov/Makefile
5455include $(TOOLS_MAKE_LIB_DIR ) /workshops/Makefile
5556
5657
Original file line number Diff line number Diff line change 1+
2+ # DEPENDENCIES #
3+
4+ include $(TOOLS_MAKE_LIB_DIR ) /tools-test-cov/javascript.mk
5+
6+
7+ # TARGETS #
8+
9+ # Run units and generate a test coverage report.
10+ #
11+ # This target instruments source code, runs unit tests, and outputs a test coverage report.
12+
13+ tools-test-cov : tools-test-javascript-cov
14+
15+ .PHONY : tools-test-cov
Original file line number Diff line number Diff line change 1+
2+ # TARGETS #
3+
4+ # Run unit tests and generate a test coverage report.
5+ #
6+ # This target instruments source code, runs unit tests, and outputs a test coverage report.
7+
8+ tools-test-istanbul :
9+ $(QUIET ) NODE_ENV=$(NODE_ENV_TEST ) \
10+ NODE_PATH=$(NODE_PATH_TEST ) \
11+ $(ISTANBUL_COVER ) \
12+ --dir $(COVERAGE_DIR ) \
13+ --report $(ISTANBUL_COVER_REPORT_FORMAT ) \
14+ $(JAVASCRIPT_TEST ) -- \
15+ $(JAVASCRIPT_TEST_FLAGS ) \
16+ $(TOOLS_TESTS )
17+
18+ .PHONY : tools-test-istanbul
Original file line number Diff line number Diff line change 1+
2+ # VARIABLES #
3+
4+ # Define the Node environment:
5+ NODE_ENV_TEST ?= $(NODE_ENV )
6+
7+ # Define the Node path:
8+ NODE_PATH_TEST ?= $(NODE_PATH )
9+
10+ # Define the code coverage instrumentation utility:
11+ JAVASCRIPT_CODE_INSTRUMENTER ?= istanbul
12+
13+
14+ # DEPENDENCIES #
15+
16+ ifeq ($(JAVASCRIPT_CODE_INSTRUMENTER ) , istanbul)
17+ include $(TOOLS_MAKE_LIB_DIR)/tools-test-cov/istanbul.mk
18+ endif
19+
20+
21+ # TARGETS #
22+
23+ # Run unit tests and generate a test coverage report.
24+ #
25+ # This target instruments JavaScript source code, runs unit tests, and outputs a test coverage report.
26+
27+ tools-test-javascript-cov :
28+ ifeq ($(JAVASCRIPT_CODE_INSTRUMENTER ) , istanbul)
29+ $(QUIET) $(MAKE) -f $(this_file) tools-test-istanbul
30+ endif
31+
32+ .PHONY : tools-test-javascript-cov
You can’t perform that action at this time.
0 commit comments