Ignore errors in concurrent safeOutput test

On Windows this test throws "EPERM: operation not permitted, rename
<path>" presumably because Windows prevents concurrent renames.  This
does not affect the test outcome, so ignore the error(s).
This commit is contained in:
Hornwitser committed 2026-09-15 22:18:16 +02:00
1 parent 0c4fac37b0
commit 9fbff1e8e5
1 file changed
+2 -1
+2 -1
View File
@@ -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+$/);
});