Skip to content

Commit

Permalink
Also fix Makefile to use --config
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Nov 18, 2020
1 parent 3a9b39d commit d33f67c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ build/lib: lib/*
build/test: $(shell find test -type f)
mkdir -p ./build
./node_modules/.bin/buble -o build/test test
cp ./test/mocha.opts ./build/test/mocha.opts
sed -i -e 's#--require ./test#--require ./build/test#g' ./build/test/mocha.opts
cp ./.mocharc.json ./build/test/.mocharc.json
sed -i -e 's#./test#./build/test#g' ./build/test/.mocharc.json

build/externaltests: externaltests/*
./node_modules/.bin/buble -o build/externaltests externaltests
Expand All @@ -44,10 +44,10 @@ test-jasmine:
./node_modules/.bin/jasmine JASMINE_CONFIG_PATH=test/support/jasmine.json

ifeq ($(MODERN_NODE), true)
MOCHA_OPTS = ./test/mocha.opts
MOCHA_CONFIG = .mocharc.json
TEST_SOURCES = $(shell find test -name '*.spec.js')
else
MOCHA_OPTS = ./build/test/mocha.opts
MOCHA_CONFIG = ./build/test/.mocharc.json
TEST_SOURCES = $(shell find build/test -name '*.spec.js')
endif

Expand Down Expand Up @@ -86,7 +86,7 @@ endif

.PHONY: coverage
coverage: nyc-includes test-sources
@./node_modules/.bin/nyc --include $(NYC_INCLUDES) --reporter=lcov --reporter=text --all -- mocha --opts $(MOCHA_OPTS) $(TEST_SOURCES)
@./node_modules/.bin/nyc --include $(NYC_INCLUDES) --reporter=lcov --reporter=text --all -- mocha --config $(MOCHA_CONFIG) $(TEST_SOURCES)
@echo google-chrome coverage/lcov-report/index.html

.PHONY: test-browser
Expand Down

0 comments on commit d33f67c

Please sign in to comment.