diff options
author | Casper Beyer <caspervonb@pm.me> | 2021-09-22 21:21:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-22 09:21:11 -0400 |
commit | 20692f3e844816d7d4a4f4fdfbfe30e416822350 (patch) | |
tree | fbecfd548b6bf479a663f79d80c45d61fc63125b /cli/tests/unit/wasm_test.ts | |
parent | 82cfb46bd1d64d41afda544bde9ef57096fb520b (diff) |
chore: replace calls to assertThrowsAsync with assertRejects (#12176)
Diffstat (limited to 'cli/tests/unit/wasm_test.ts')
-rw-r--r-- | cli/tests/unit/wasm_test.ts | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/cli/tests/unit/wasm_test.ts b/cli/tests/unit/wasm_test.ts index 938eeab7a..7fcc33d96 100644 --- a/cli/tests/unit/wasm_test.ts +++ b/cli/tests/unit/wasm_test.ts @@ -1,9 +1,4 @@ -import { - assert, - assertEquals, - assertThrowsAsync, - unitTest, -} from "./test_util.ts"; +import { assert, assertEquals, assertRejects, unitTest } from "./test_util.ts"; // The following blob can be created by taking the following s-expr and pass // it through wat2wasm. @@ -39,7 +34,7 @@ unitTest(async function wasmInstantiateWorksWithBuffer() { // check that our implementation of the callback disallows it. unitTest( async function wasmInstantiateStreamingFailsWithBuffer() { - await assertThrowsAsync(async () => { + await assertRejects(async () => { await WebAssembly.instantiateStreaming( // Bypassing the type system simpleWasm as unknown as Promise<Response>, @@ -50,7 +45,7 @@ unitTest( unitTest( async function wasmInstantiateStreamingNoContentType() { - await assertThrowsAsync( + await assertRejects( async () => { const response = Promise.resolve(new Response(simpleWasm)); await WebAssembly.instantiateStreaming(response); |