diff --git a/lib/internal/main/watch_mode.js b/lib/internal/main/watch_mode.js index 8b3133bb8ecc07..4fae6363226310 100644 --- a/lib/internal/main/watch_mode.js +++ b/lib/internal/main/watch_mode.js @@ -44,7 +44,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 ceec87e0b09d52..e65da84a4c4422 100644 --- a/lib/internal/test_runner/runner.js +++ b/lib/internal/test_runner/runner.js @@ -384,7 +384,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);