Validates that a function throws an error or rejects when executed.
Expects the provided function to fail. If the function executes
successfully without throwing an error or rejecting, this validator will
throw an exception. Supports both synchronous and asynchronous functions.
Validates that a function throws an error or rejects when executed.
Expects the provided function to fail. If the function executes successfully without throwing an error or rejecting, this validator will throw an exception. Supports both synchronous and asynchronous functions.
Example
Throws
Error when the task function does not throw an error or reject