waygraph / GivenBlockOptions
Interface: GivenBlockOptions
Defined in: src/engine/block/kinds/given.ts:9
Properties
description?
optionaldescription?:string
Defined in: src/engine/block/kinds/given.ts:12
What must be true before the scenario starts, in the scenario's words: "a tenant exists with two projects".
name
name:
string
Defined in: src/engine/block/kinds/given.ts:10
ready?
optionalready?: (mem) =>boolean|Promise<boolean>
Defined in: src/engine/block/kinds/given.ts:20
True when it is already there: run is skipped (and so is undo, it isn't this run's to remove).
Parameters
mem
Returns
boolean | Promise<boolean>
run
run: (
mem) =>void|Promise<void>
Defined in: src/engine/block/kinds/given.ts:16
Makes it, with any code. Keep what the steps need (an id, a name) in mem.
Parameters
mem
Returns
void | Promise<void>
sets?
optionalsets?: readonlyMemKey<unknown>[]
Defined in: src/engine/block/kinds/given.ts:14
The mem keys run fills: the flow's steps may read them without the run supplying them.
undo?
optionalundo?: (mem) =>void|Promise<void>
Defined in: src/engine/block/kinds/given.ts:18
Puts the world back; played after the flow, pass or fail, last given first. Its failure is reported, never the flow's.
Parameters
mem
Returns
void | Promise<void>