Docs (4.0.0)
class NegatedAssertion method

toThrowError

Runs a function and asserts that it doesn’t throw an error when called with given arguments.

toThrowError(...args: any[]): Assertion<unknown>

Parameters

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

Return value

A new assertion for the return value.

Related