chore: replace calls to assertThrowsAsync with assertRejects (#12176)

This commit is contained in:
Casper Beyer 2021-09-22 21:21:11 +08:00 committed by GitHub
parent 82cfb46bd1
commit 20692f3e84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 113 additions and 134 deletions

View file

@ -8,8 +8,8 @@
import {
assert,
assertEquals,
assertRejects,
assertThrows,
assertThrowsAsync,
unitTest,
} from "./test_util.ts";
@ -200,7 +200,7 @@ unitTest(
const reader = new Deno.Buffer(new ArrayBuffer(MAX_SIZE + 1));
const buf = new Deno.Buffer();
await assertThrowsAsync(
await assertRejects(
async () => {
await buf.readFrom(reader);
},
@ -302,7 +302,7 @@ unitTest(async function bufferReadFrom() {
const fub = new Uint8Array(testString.length);
await empty(b, s, fub);
}
assertThrowsAsync(async function () {
assertRejects(async function () {
await new Deno.Buffer().readFrom(null!);
});
});