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/make_temp_test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/tests/unit/make_temp_test.ts') diff --git a/cli/tests/unit/make_temp_test.ts b/cli/tests/unit/make_temp_test.ts index 5b28c210b..99559623f 100644 --- a/cli/tests/unit/make_temp_test.ts +++ b/cli/tests/unit/make_temp_test.ts @@ -2,8 +2,8 @@ import { assert, assertEquals, + assertRejects, assertThrows, - assertThrowsAsync, unitTest, } from "./test_util.ts"; @@ -64,7 +64,7 @@ unitTest( assert(dir3.startsWith(dir1)); assert(/^[\\\/]/.test(dir3.slice(dir1.length))); // Check that creating a temp dir inside a nonexisting directory fails. - await assertThrowsAsync(async () => { + await assertRejects(async () => { await Deno.makeTempDir({ dir: "/baddir" }); }, Deno.errors.NotFound); }, @@ -140,7 +140,7 @@ unitTest( assert(file3.startsWith(dir)); assert(/^[\\\/]/.test(file3.slice(dir.length))); // Check that creating a temp file inside a nonexisting directory fails. - await assertThrowsAsync(async () => { + await assertRejects(async () => { await Deno.makeTempFile({ dir: "/baddir" }); }, Deno.errors.NotFound); }, -- cgit v1.2.3