assertThrowsErrorAsync
Assertion function that verifies an async function throws an error.
Returns the thrown error for further assertions.
import { assertThrowsErrorAsync } from "@kensio/smartass";
const error = await assertThrowsErrorAsync(async () => loadUser("missing"));
// error is returned as Error; this assertion does not narrow another value.Source
Section titled “Source”Source file: src/assert/throws-error-async/throws-error-async.assert.ts
