Function: tryContracts()
function tryContracts(
plan,
examples,
scope
): Promise<string[]>;Defined in: packages/std/src/blueprints.ts:94
Runs each example through its collection's schema and contract, and says
which came out other than expected, so its proposer sees a contract that
refuses a fair move, or lets a cheat count, before proposing it. Rules and
lines are not tried, member asks the space as it is now, and a cited
version can't be given, so an example whose contract cites one is never pass.
Parameters
| Parameter | Type |
|---|---|
plan | Blueprint |
examples | readonly ContractExample[] |
scope | { member: (did) => boolean; proposer: string; } |
scope.member | (did) => boolean |
scope.proposer | string |
Returns
Promise<string[]>