Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/parallel/test-runner-watch-mode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function testWatch({ fileToUpdate, file }) {
const ran2 = util.createDeferredPromise();
const child = spawn(process.execPath,
['--watch', '--test', file ? fixturePaths[file] : undefined].filter(Boolean),
{ encoding: 'utf8', stdio: 'pipe', cwd: tmpdir.path });
{ encoding: 'utf8', stdio: 'pipe', cwd: file ? undefined : tmpdir.path });
let stdout = '';

child.stdout.on('data', (data) => {
Expand All @@ -47,10 +47,10 @@ async function testWatch({ fileToUpdate, file }) {
await ran1.promise;
const content = fixtureContent[fileToUpdate];
const path = fixturePaths[fileToUpdate];
const interval = setInterval(() => writeFileSync(path, content), common.platformTimeout(1000));
const interval = setInterval(() => writeFileSync(path, content), common.platformTimeout(2000));
await ran2.promise;
clearInterval(interval);
child.kill();
child.kill('SIGTERM');
}

describe('test runner watch mode', () => {
Expand Down