Type Definitions
Contract(ok) → {void}
A code block containing one or more condition checks.
A check is performed by calling one of a few special methods
(equal, match, deepEqual, type etc)
on the Report object.
Contracts may be nested using the 'nested' method which accepts
another contract and records a pass/failure in the parent accordingly.q
A contract is always executed to the end.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ok |
Report | An object that records check results. | |
...list |
Any |
<optional> |
Additional parameters (e.g. data structure to be validated) |
Returns:
Returned value is ignored.
- Type
- void