summaryrefslogtreecommitdiff
path: root/cli/tests/unit/copy_file_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/copy_file_test.ts')
-rw-r--r--cli/tests/unit/copy_file_test.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tests/unit/copy_file_test.ts b/cli/tests/unit/copy_file_test.ts
index f89c1c9ee..c9b82c77e 100644
--- a/cli/tests/unit/copy_file_test.ts
+++ b/cli/tests/unit/copy_file_test.ts
@@ -1,8 +1,8 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
import {
assertEquals,
+ assertRejects,
assertThrows,
- assertThrowsAsync,
unitTest,
} from "./test_util.ts";
@@ -162,7 +162,7 @@ unitTest(
const fromFilename = tempDir + "/from.txt";
const toFilename = tempDir + "/to.txt";
// We skip initial writing here, from.txt does not exist
- await assertThrowsAsync(async () => {
+ await assertRejects(async () => {
await Deno.copyFile(fromFilename, toFilename);
}, Deno.errors.NotFound);
@@ -192,7 +192,7 @@ unitTest(
unitTest(
{ perms: { read: false, write: true } },
async function copyFilePerm1() {
- await assertThrowsAsync(async () => {
+ await assertRejects(async () => {
await Deno.copyFile("/from.txt", "/to.txt");
}, Deno.errors.PermissionDenied);
},
@@ -201,7 +201,7 @@ unitTest(
unitTest(
{ perms: { read: true, write: false } },
async function copyFilePerm2() {
- await assertThrowsAsync(async () => {
+ await assertRejects(async () => {
await Deno.copyFile("/from.txt", "/to.txt");
}, Deno.errors.PermissionDenied);
},