diff --git a/lib/internal/main/watch_mode.js b/lib/internal/main/watch_mode.js index 724acd252419cb..1fcb6453d903dc 100644 --- a/lib/internal/main/watch_mode.js +++ b/lib/internal/main/watch_mode.js @@ -42,7 +42,7 @@ const args = ArrayPrototypeFilter(process.execArgv, (arg, i, arr) => arg !== '--watch' && arg !== '--watch-preserve-output'); ArrayPrototypePushApply(args, kCommand); -const watcher = new FilesWatcher({ debounce: 500, mode: kShouldFilterModules ? 'filter' : 'all' }); +const watcher = new FilesWatcher({ debounce: 200, mode: kShouldFilterModules ? 'filter' : 'all' }); ArrayPrototypeForEach(kWatchedPaths, (p) => watcher.watchPath(p)); let graceTimer; diff --git a/lib/internal/test_runner/runner.js b/lib/internal/test_runner/runner.js index 19d57ae9c0e6eb..d26a05aef48ca8 100644 --- a/lib/internal/test_runner/runner.js +++ b/lib/internal/test_runner/runner.js @@ -419,7 +419,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) { function watchFiles(testFiles, root, inspectPort, signal, testNamePatterns) { const runningProcesses = new SafeMap(); const runningSubtests = new SafeMap(); - const watcher = new FilesWatcher({ debounce: 500, mode: 'filter', signal }); + const watcher = new FilesWatcher({ debounce: 200, mode: 'filter', signal }); const filesWatcher = { __proto__: null, watcher, runningProcesses, runningSubtests }; watcher.on('changed', ({ owners }) => { diff --git a/lib/internal/watch_mode/files_watcher.js b/lib/internal/watch_mode/files_watcher.js index 6a1052ab0188e6..b38f94d7cc8051 100644 --- a/lib/internal/watch_mode/files_watcher.js +++ b/lib/internal/watch_mode/files_watcher.js @@ -31,7 +31,7 @@ class FilesWatcher extends EventEmitter { #mode; #signal; - constructor({ debounce = 500, mode = 'filter', signal } = kEmptyObject) { + constructor({ debounce = 200, mode = 'filter', signal } = kEmptyObject) { super(); validateNumber(debounce, 'options.debounce', 0, TIMEOUT_MAX);