Skip to content

waygraph / runBranchRegression

Function: runBranchRegression() ​

runBranchRegression(flow, context, mem?, options?): Promise<BranchRunResult[]>

Defined in: src/engine/flow/branch-regression.ts:96

Runs every path through flow's .branch() tree - by default in a CLONED session per branch point (see this file's own header), so one branch finishing doesn't consume another's chance to run. Each explored branch gets its own MemPage (via MemPage.clone, seeded further with seedMemStub for anything a route alone requires that the shared prefix didn't already set).

Parameters ​

flow ​

Flow<Checkpoint<string>>

context ​

BrowserContext

mem? ​

MemPage = ...

options? ​

RunBranchRegressionOptions

Returns ​

Promise<BranchRunResult[]>

Example ​

ts
for (const r of await runBranchRegression(loginFlow, context)) {
  console.log(r.path, r.status, r.error ?? "");
}

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