From 489a2663d73ea5d7f21fa73a9784353cdf7fb218 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Mon, 26 Jan 2026 16:57:37 +0100 Subject: [PATCH] test: delay writing the files only on macOS Refs: https://github.com/nodejs/node/pull/60060 --- test/parallel/test-fs-promises-watch-iterator.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-fs-promises-watch-iterator.js b/test/parallel/test-fs-promises-watch-iterator.js index 529cf4a6c69591..e7788201f06e25 100644 --- a/test/parallel/test-fs-promises-watch-iterator.js +++ b/test/parallel/test-fs-promises-watch-iterator.js @@ -35,8 +35,11 @@ class WatchTestCase { } } async writeFiles() { - // Do the write with a delay to ensure that the OS is ready to notify us. - await setTimeout(common.platformTimeout(100)); + if (common.isMacOS) { + // Do the write with a delay to ensure that the OS is ready to notify us. + // See https://github.com/nodejs/node/issues/52601. + await setTimeout(common.platformTimeout(100)); + } for (const fileName of [...this.files]) { await writeFile(this.filePath(fileName), Date.now() + fileName.repeat(1e4));