1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -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 GitHub
parent 8cfd9968fa
commit 2435a361c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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