Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: deflake test-runner-watch-mode #49997

Closed
wants to merge 1 commit into from
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
Loading