-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build: Add /shared path to unit test runner
Tests in /shared were not being run by the test runner. Some makefiles also needed tweaking. The /shared folder will be removed soon but the tests should be run in the meantime.
- Loading branch information
Showing
2 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
REPORTER ?= spec | ||
MOCHA ?= ../../../node_modules/.bin/mocha | ||
NODE_BIN := $(shell npm bin) | ||
MOCHA ?= $(NODE_BIN)/mocha | ||
BASE_DIR := $(NODE_BIN)/../.. | ||
NODE_PATH := test:$(BASE_DIR)/client:$(BASE_DIR)/shared | ||
|
||
# In order to simply stub modules, add test to the NODE_PATH | ||
test: | ||
@NODE_ENV=test NODE_PATH=test:../../../client $(MOCHA) --compilers js:babel/register --reporter $(REPORTER) | ||
@NODE_ENV=test NODE_PATH=$(NODE_PATH) $(MOCHA) --compilers js:babel/register --reporter $(REPORTER) | ||
|
||
.PHONY: test |