summaryrefslogtreecommitdiff
path: root/cli/tests/unit/stat_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/stat_test.ts
parent82cfb46bd1d64d41afda544bde9ef57096fb520b (diff)
chore: replace calls to assertThrowsAsync with assertRejects (#12176)
Diffstat (limited to 'cli/tests/unit/stat_test.ts')
-rw-r--r--cli/tests/unit/stat_test.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/tests/unit/stat_test.ts b/cli/tests/unit/stat_test.ts
index 7db9dee71..3630e369c 100644
--- a/cli/tests/unit/stat_test.ts
+++ b/cli/tests/unit/stat_test.ts
@@ -2,8 +2,8 @@
import {
assert,
assertEquals,
+ assertRejects,
assertThrows,
- assertThrowsAsync,
pathToAbsoluteFileUrl,
unitTest,
} from "./test_util.ts";
@@ -220,13 +220,13 @@ unitTest(
);
unitTest({ perms: { read: false } }, async function statPerm() {
- await assertThrowsAsync(async () => {
+ await assertRejects(async () => {
await Deno.stat("README.md");
}, Deno.errors.PermissionDenied);
});
unitTest({ perms: { read: true } }, async function statNotFound() {
- await assertThrowsAsync(
+ await assertRejects(
async () => {
await Deno.stat("bad_file_name"), Deno.errors.NotFound;
},
@@ -262,13 +262,13 @@ unitTest({ perms: { read: true } }, async function lstatSuccess() {
});
unitTest({ perms: { read: false } }, async function lstatPerm() {
- await assertThrowsAsync(async () => {
+ await assertRejects(async () => {
await Deno.lstat("README.md");
}, Deno.errors.PermissionDenied);
});
unitTest({ perms: { read: true } }, async function lstatNotFound() {
- await assertThrowsAsync(async () => {
+ await assertRejects(async () => {
await Deno.lstat("bad_file_name");
}, Deno.errors.NotFound);
});