Docs (4.0.0)
class NegatedAssertion method

toThrowErrorAsync

Runs a function and asserts that it doesn’t throw an error or returns a promise that’s rejected.

toThrowErrorAsync(...args: any[]): Promise<Assertion<any>>

Note
This function is asynchronous and must be await-ed.

Parameters

  • args — The arguments passed directly to the function, if any

Return value

A promise for a new assertion for the return value.

Related