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