Assertion to test if a callback throws an exception when run.
Doesn't do any check for the type of exception or message (may be added in the future, when a good API is found). Currently just executes the callback argument, then calling ok(false) when no exception is thrown, otherwise calling ok(true), in the try-block.
Arguments:
| block | Function | |
|---|---|---|
| Callback to execute, expecting it to throw an exception. Gets called with default scope (window) and no arguments. | ||
| expected (Optional) | Function | |
| An optional verification. Can be a regex to test the thrown exception. Can be a constructor function, tested with instanceof against the exception. Can be a callback - called with the exception as the first argument, return true for a valid exception. | ||
| message (Optional) | String | |
| A message to output with the assertion result. | ||
