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/chmod_test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/tests/unit/chmod_test.ts') diff --git a/cli/tests/unit/chmod_test.ts b/cli/tests/unit/chmod_test.ts index 5908ea09a..5844c0ef8 100644 --- a/cli/tests/unit/chmod_test.ts +++ b/cli/tests/unit/chmod_test.ts @@ -2,8 +2,8 @@ import { assert, assertEquals, + assertRejects, assertThrows, - assertThrowsAsync, unitTest, } from "./test_util.ts"; @@ -158,14 +158,14 @@ unitTest( ); unitTest({ perms: { write: true } }, async function chmodFailure() { - await assertThrowsAsync(async () => { + await assertRejects(async () => { const filename = "/badfile.txt"; await Deno.chmod(filename, 0o777); }, Deno.errors.NotFound); }); unitTest({ perms: { write: false } }, async function chmodPerm() { - await assertThrowsAsync(async () => { + await assertRejects(async () => { await Deno.chmod("/somefile.txt", 0o777); }, Deno.errors.PermissionDenied); }); -- cgit v1.2.3