assert
Provides generic assertion methods.
contain
Asserts that the string value contains a substring.
Parameters:
actual
String
Actual value.
contains
String
Verbatim string to be contained.
message
String
optional
Message to throw if assertion fails.
equal
Asserts that two values are equal (non-strict equality).
Parameters:
actual
Object
Actual value.
expected
Object
Expected value. Either an object or a string prefixed with regex:
.
message
String
optional
Message to throw if assertion fails.
fail
Fails test with the given message.
Parameters:
message
String
optional
Error message to return.
notEqual
Asserts that two values are not equal (non-strict inequality).
Parameters:
actual
Object
Actual value.
expected
Object
Expected value. Either an object or a string prefixed with regex:
.
message
String
optional
Message to throw if assertion fails.
pass
Passes the test with the given message.
Parameters:
message
String
optional
Message to return.
Last updated