1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

chore: fix flaky COPYFILE_EXCL test (#26370)

It was missing an await
This commit is contained in:
Nathan Whitaker 2024-10-17 15:19:37 -07:00 committed by Bartek Iwańczuk
parent ca6d293b71
commit c6492f6ac6
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -223,7 +223,9 @@ Deno.test("[node/fs] copyFile COPYFILE_EXCL works", async () => {
await writeFile(src, ""); await writeFile(src, "");
await copyFile(src, dest, fsPromiseConstants.COPYFILE_EXCL); await copyFile(src, dest, fsPromiseConstants.COPYFILE_EXCL);
assert(existsSync(dest)); assert(existsSync(dest));
assertRejects(() => copyFile(src, dest, fsPromiseConstants.COPYFILE_EXCL)); await assertRejects(() =>
copyFile(src, dest, fsPromiseConstants.COPYFILE_EXCL)
);
const dest2 = join(dir, "dest2.txt"); const dest2 = join(dir, "dest2.txt");
copyFileSync(src, dest2, fsPromiseConstants.COPYFILE_EXCL); copyFileSync(src, dest2, fsPromiseConstants.COPYFILE_EXCL);
assert(existsSync(dest2)); assert(existsSync(dest2));