Catch Error
A handy helper to make testing whether an error was thrown just a little bit nicer.
// some test setup... { throw 'wat'} var error = tobeanto
You may also need to set context for your function if it has been constructed
with the new
keyword. You can do this by passing in context
like so:
var error =