From a9ce9eb4468bca25ff21142e5acd055e0beac954 Mon Sep 17 00:00:00 2001 From: Carl-Erik Kopseng Date: Tue, 7 Nov 2023 03:04:34 +0100 Subject: [PATCH] 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. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e8fb2e0bd..a097ca0ad 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "license": "BSD-3-Clause", "scripts": { "test-node": "mocha --recursive -R dot \"test/**/*-test.js\"", - "test-dev": "npm run test-node -- --watch -R min", + "test-dev": "npm run test-node -- -n watch -n watch-path=test --node-option watch-path=lib -R min", "test-headless": "mochify --no-detect-globals --recursive -R dot --grep WebWorker --invert \"test/**/*-test.js\"", "test-coverage": "nyc npm run test-headless -- --transform [ babelify --ignore [ test ] --plugins [ babel-plugin-istanbul ] ]", "test-cloud": "npm run test-headless -- --wd",