assert
Provides generic assertion methods.
Last updated
Provides generic assertion methods.
Last updated
Asserts that the string value contains a substring.
Parameters:
Name | Type | Description |
---|---|---|
Asserts that two values are equal (non-strict equality).
Parameters:
Name | Type | Description |
---|---|---|
Fails test with the given message.
Parameters:
Asserts that two values are not equal (non-strict inequality).
Parameters:
Passes the test with the given message.
Parameters:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
actual
String
Actual value.
contains
String
Verbatim string to be contained.
message
String
optional
Message to throw if assertion fails.
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.
message
String
optional
Error message to return.
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.
message
String
optional
Message to return.