Skip to content

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? ​

readonly optional __wgFactory?: "expect"

modVerify() ​

modVerify(nameOrIndex, newCheck): ExpectBlock<Out>

Parameters ​

nameOrIndex ​

string | number

newCheck ​

Trait | ((page, mem) => Promise<boolean | TraitResult>)

Trait


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 ​

Trait[] | ((out) => Trait[])

Returns ​

ExpectBlock<Out>

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed