Skip to content

Commit e1b2508

Browse files
committed
Improve test scripts
This uses `nyc` directly instead of via `tap`. There is currently some semver brokeness happening due to a major version bump in `nyc` making it's way into a minor version bump for `tap`. I think the easiest solution is just to avoid the problem altogether by turning off `tap`s coverage option and using `nyc` directly. Reference: tapjs/tapjs#197 --- This also switches us to the `classic` reporter. Historically were using `dots` reporter with `tape`, but that provided poor diagnostic information on failures. The `classic` reporter does a much better job of providing all the information we need when a test fails.
1 parent 5e6327d commit e1b2508

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

package.json

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@
3737
"node": ">=0.10.0"
3838
},
3939
"scripts": {
40-
"test": "xo && tap --coverage --reporter=spec --timeout=150 test/*.js test/reporters/*.js",
41-
"test-win": "tap --reporter=spec --timeout=150 test/*.js test/reporters/*.js",
42-
"coverage": "tap --coverage-report=lcov"
40+
"test": "xo && nyc --reporter=lcov --reporter=text tap --no-cov --timeout=150 test/*.js test/reporters/*.js",
41+
"test-win": "tap --no-cov --reporter=classic --timeout=150 test/*.js test/reporters/*.js"
4342
},
4443
"files": [
4544
"lib",
@@ -130,14 +129,6 @@
130129
"xo": "*",
131130
"zen-observable": "^0.1.6"
132131
},
133-
"config": {
134-
"nyc": {
135-
"exclude": [
136-
"node_modules[/\\\\]",
137-
"test[/\\\\]"
138-
]
139-
}
140-
},
141132
"xo": {
142133
"ignore": [
143134
"cli.js"

0 commit comments

Comments
 (0)