Asserts that the current value is a function and when executed throws an error where the
message matches the msgMatch
string or regular expression.
Optional
msgMatch: string | RegExpThe message to match
Optional
evalMsg: MsgSourceThe message to display if the value does not throw an error
A new IAssertInst instance with the same value and context.
An AssertionFailure error if the value is not a function
An AssertionFailure error is not an error instance
An AssertionFailure error if the value does not throw an error
An AssertionFailure error if the message from the thrown error does not
include the string
identified in the msgMatch
.
An AssertionFailure error if the message from the thrown error does not
match the regular expression passed in msgMatch
.
Asserts that the current value throws an error which matches the errorLike type and optionally
also matches the msgMatch
message
Optional
errorLike: Error | ErrorConstructorThe error to match
Optional
msgMatch: string | RegExpThe message to match
Optional
evalMsg: MsgSourceThe message to display if the value does not throw an error
A new IAssertInst instance with the same value and context.
An AssertionFailure error if the value is not a function
An AssertionFailure error is not an error instance
An AssertionFailure error if the error thrown does not match the errorLike
constructor or type.
An AssertionFailure error if the value does not throw an error
An AssertionFailure error if the message from the thrown error does not
include the string
identified in the msgMatch
.
An AssertionFailure error if the message from the thrown error does not
match the regular expression passed in msgMatch
.
The throw function signatures