waygraph / ExpectBlock
Type Alias: ExpectBlock<Out>
ExpectBlock<
Out> =Omit<DefinedBlock<Out,Out>,"withVerify"|"modVerify"|"modVerifyAll"|"stubBefore"|"stub"|"stubOnError"> &object
Defined in: src/engine/block/kinds/expect.ts:27
A Block from defineExpectBlock: one expectation, used in expect: [...].
Type Parameters
Out
Out extends Checkpoint<string>
Type Declaration
__wgFactory?
readonlyoptional__wgFactory?:"expect"
modVerify()
modVerify(
nameOrIndex,newCheck):ExpectBlock<Out>
Parameters
nameOrIndex
string | number
newCheck
Trait | ((page, mem) => Promise<boolean | TraitResult>)
Function
(page, mem) => Promise<boolean | TraitResult>
Returns
ExpectBlock<Out>
modVerifyAll()
modVerifyAll(
patches):ExpectBlock<Out>
Parameters
patches
Record<string, Trait["check"] | Trait>
Returns
ExpectBlock<Out>
stub()
stub(
stub):ExpectBlock<Out>
Parameters
stub
StubLifecycleFn<Out>
Returns
ExpectBlock<Out>
stubBefore()
stubBefore(
stub):ExpectBlock<Out>
Demo narration around the expectation (the demo plays them after the step it belongs to).
Parameters
stub
StubLifecycleFn<Out>
Returns
ExpectBlock<Out>
stubOnError()
stubOnError(
stub):ExpectBlock<Out>
Parameters
stub
StubLifecycleFn<Out>
Returns
ExpectBlock<Out>
withVerify()
withVerify(
verify):ExpectBlock<Out>
Parameters
verify
Returns
ExpectBlock<Out>