Skip to content

Commit

Permalink
chore: Switch from nyc to c8 for code coverage
Browse files Browse the repository at this point in the history
nyc was no longer working with the ES module imports, and
c8 is in any case more efficient, using native V8 coverage
made available in Node.js 10.12.0 and later.
  • Loading branch information
eemeli committed Jul 27, 2021
1 parent 86f6ce3 commit b7bf2e8
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 1,198 deletions.
3 changes: 1 addition & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ DOC_DESTINATION := $(subst @fluent, ../html, $(PACKAGE))
export SHELL := /bin/bash
ESLINT ?= $(ROOT)node_modules/.bin/eslint
TSC ?= $(ROOT)node_modules/.bin/tsc
NYC ?= $(ROOT)node_modules/.bin/nyc
MOCHA ?= $(ROOT)node_modules/.bin/mocha
ROLLUP ?= $(ROOT)node_modules/.bin/rollup
TYPEDOC ?= $(ROOT)node_modules/.bin/typedoc
Expand All @@ -29,7 +28,7 @@ TYPEDOC_CMD = $(TYPEDOC) src/index.?s \
--includeVersion \
$(NULL)

MOCHA_CMD =@$(NYC) --reporter=text --reporter=html $(MOCHA) \
MOCHA_CMD = npx c8 $(MOCHA) \
--recursive --ui tdd \
$(MOCHA_EXTRA_ARGS) \
test/**/*_test.js \
Expand Down
2 changes: 1 addition & 1 deletion fluent-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"format"
],
"scripts": {
"test": "mocha -ui tdd --require ./test/index.js 'test/*_test.js'"
"test": "c8 mocha -ui tdd --require ./test/index.js 'test/*_test.js'"
},
"engines": {
"node": ">=12.0.0",
Expand Down
Loading

0 comments on commit b7bf2e8

Please sign in to comment.