From b8948996b4398c068fb649a508b3811f06ab23cc Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Sun, 19 Feb 2023 21:52:31 +0200 Subject: [PATCH] test: fix flaky test-watch-mode-files_watcher PR-URL: https://github.com/nodejs/node/pull/46738 Reviewed-By: Colin Ihrig Reviewed-By: Debadree Chatterjee Reviewed-By: Yagiz Nizipli --- test/parallel/test-watch-mode-files_watcher.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/test/parallel/test-watch-mode-files_watcher.mjs b/test/parallel/test-watch-mode-files_watcher.mjs index 4c507d61e00c7f..19f71a04e40df8 100644 --- a/test/parallel/test-watch-mode-files_watcher.mjs +++ b/test/parallel/test-watch-mode-files_watcher.mjs @@ -104,6 +104,7 @@ describe('watch mode file watcher', () => { watcher.watchPath(tmpdir.path); const changed = once(watcher, 'changed'); + await setTimeout(common.platformTimeout(100)); // avoid throttling writeFileSync(file, 'changed'); await changed; assert.strictEqual(changesCount, 1);