Skip to content

Commit

Permalink
test: remove interval and give more time to unsync
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarchini committed Sep 19, 2024
1 parent 0d4387e commit e6e0999
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/parallel/test-runner-watch-mode-complex.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,17 @@ describe('test runner watch mode with more complex setup', () => {
runs.push(currentRun);
currentRun = '';
const fileToDeletePathLocal = tmpdir.resolve('test-to-delete.mjs');
unlinkSync(fileToDeletePathLocal);
await new Promise((resolve) => setTimeout(() => {
unlinkSync(fileToDeletePathLocal);
resolve();
}, common.platformTimeout(1000)));

Check failure on line 82 in test/parallel/test-runner-watch-mode-complex.mjs

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Trailing spaces not allowed

const content = fixtureContent['dependency.mjs'];
const path = fixturePaths['dependency.mjs'];
const interval = setInterval(() => writeFileSync(path, content), common.platformTimeout(1000));
setTimeout(() => writeFileSync(path, content), common.platformTimeout(1000));
await ran2.promise;
runs.push(currentRun);
currentRun = '';
clearInterval(interval);
child.kill();

assert.strictEqual(runs.length, 2);
Expand Down

0 comments on commit e6e0999

Please sign in to comment.