A singleton instance of the IAssertClass interface that can be used to perform various
assertions, the functions check the provided expression and throw an AssertionFailure
if the expression is false.
The assert contains a number of functions that can be used to perform various assertions, like
checking if a value is true, false, null, undefined, empty, equal, strictly equal,
deep equal, etc.
The assert object is also a function that can be called directly with the following parameters:
Param: expr
The expression to evaluate.
Param: initMsg
The message to display if the assertion fails. This can be a string or a function that returns a string.
A singleton instance of the IAssertClass interface that can be used to perform various assertions, the functions check the provided expression and throw an AssertionFailure if the expression is false.
The
assert
contains a number of functions that can be used to perform various assertions, like checking if a value istrue
,false
,null
,undefined
,empty
,equal
,strictly equal
,deep equal
, etc.The
assert
object is also a function that can be called directly with the following parameters: