summaryrefslogtreecommitdiff
path: root/cli/tests/unit/real_path_test.ts
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2021-09-22 21:21:11 +0800
committerGitHub <noreply@github.com>2021-09-22 09:21:11 -0400
commit20692f3e844816d7d4a4f4fdfbfe30e416822350 (patch)
treefbecfd548b6bf479a663f79d80c45d61fc63125b /cli/tests/unit/real_path_test.ts
parent82cfb46bd1d64d41afda544bde9ef57096fb520b (diff)
chore: replace calls to assertThrowsAsync with assertRejects (#12176)
Diffstat (limited to 'cli/tests/unit/real_path_test.ts')
-rw-r--r--cli/tests/unit/real_path_test.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tests/unit/real_path_test.ts b/cli/tests/unit/real_path_test.ts
index 8c0728ca9..542d06996 100644
--- a/cli/tests/unit/real_path_test.ts
+++ b/cli/tests/unit/real_path_test.ts
@@ -3,8 +3,8 @@ import {
assert,
assertEquals,
assertMatch,
+ assertRejects,
assertThrows,
- assertThrowsAsync,
pathToAbsoluteFileUrl,
unitTest,
} from "./test_util.ts";
@@ -103,13 +103,13 @@ unitTest(
);
unitTest({ perms: { read: false } }, async function realPathPerm() {
- await assertThrowsAsync(async () => {
+ await assertRejects(async () => {
await Deno.realPath("some_file");
}, Deno.errors.PermissionDenied);
});
unitTest({ perms: { read: true } }, async function realPathNotFound() {
- await assertThrowsAsync(async () => {
+ await assertRejects(async () => {
await Deno.realPath("bad_filename");
}, Deno.errors.NotFound);
});