From 20692f3e844816d7d4a4f4fdfbfe30e416822350 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Wed, 22 Sep 2021 21:21:11 +0800 Subject: chore: replace calls to assertThrowsAsync with assertRejects (#12176) --- cli/tests/unit/read_dir_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/tests/unit/read_dir_test.ts') diff --git a/cli/tests/unit/read_dir_test.ts b/cli/tests/unit/read_dir_test.ts index 4f02fae9b..49f899feb 100644 --- a/cli/tests/unit/read_dir_test.ts +++ b/cli/tests/unit/read_dir_test.ts @@ -2,8 +2,8 @@ import { assert, assertEquals, + assertRejects, assertThrows, - assertThrowsAsync, pathToAbsoluteFileUrl, unitTest, } from "./test_util.ts"; @@ -70,7 +70,7 @@ unitTest({ perms: { read: true } }, async function readDirWithUrl() { }); unitTest({ perms: { read: false } }, async function readDirPerm() { - await assertThrowsAsync(async () => { + await assertRejects(async () => { await Deno.readDir("tests/")[Symbol.asyncIterator]().next(); }, Deno.errors.PermissionDenied); }); -- cgit v1.2.3