Skip to content

Commit a9ce9eb

Browse files
committed
Fix Mocha watch task by delegating to Node
Since Node 18 there is a built-in watch mode. Mocha's watch mode is really buggy and this fix is much snappier and bug-free AFAIK.
1 parent 30ad237 commit a9ce9eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"license": "BSD-3-Clause",
3333
"scripts": {
3434
"test-node": "mocha --recursive -R dot \"test/**/*-test.js\"",
35-
"test-dev": "npm run test-node -- --watch -R min",
35+
"test-dev": "npm run test-node -- -n watch -n watch-path=test --node-option watch-path=lib -R min",
3636
"test-headless": "mochify --no-detect-globals --recursive -R dot --grep WebWorker --invert \"test/**/*-test.js\"",
3737
"test-coverage": "nyc npm run test-headless -- --transform [ babelify --ignore [ test ] --plugins [ babel-plugin-istanbul ] ]",
3838
"test-cloud": "npm run test-headless -- --wd",

0 commit comments

Comments
 (0)