From 9fbff1e8e5db61e23e9863d3ea3f1a48323299c9 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Mon, 14 Sep 2026 19:19:23 +0200 Subject: [PATCH] Ignore errors in concurrent safeOutput test On Windows this test throws "EPERM: operation not permitted, rename " presumably because Windows prevents concurrent renames. This does not affect the test outcome, so ignore the error(s). --- test/lib/file_ops.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/lib/file_ops.js b/test/lib/file_ops.js index b338d927..dfaf905f 100644 --- a/test/lib/file_ops.js +++ b/test/lib/file_ops.js @@ -122,7 +122,8 @@ describe("lib/file_ops", function() { for (let i = 0; i < 20; i++) { writes.push(lib.safeOutputFile(target, `write ${i}`, "utf8")); } - await Promise.all(writes); + // Ignore errors from concurrently renaming onto the same file. + await Promise.allSettled(writes); await assertNoTemporary(target); assert.match(await fs.readFile(target, "utf8"), /^write \d+$/); });