diff --git a/lib/internal/test_runner/runner.js b/lib/internal/test_runner/runner.js index c5cc74bc0abcb0..8e4c18fd726009 100644 --- a/lib/internal/test_runner/runner.js +++ b/lib/internal/test_runner/runner.js @@ -417,7 +417,7 @@ function watchFiles(testFiles, opts) { const filesWatcher = { __proto__: null, watcher, runningProcesses, runningSubtests }; opts.root.harness.watching = true; // Watch for created/deleted files in the current directory - const allFilesWatcher = new FilesWatcher({ __proto__: null, debounce: 200, mode: 'all' }); + const allFilesWatcher = new FilesWatcher({ __proto__: null, debounce: 200, mode: 'all', signal: opts.signal }); allFilesWatcher.watchPath(process.cwd()); allFilesWatcher.on('changed', ({ owners, eventType }) => { if (eventType === 'rename') {