Reference for @qawolf/flows/cli, the Node-based entry point for headless flows that handle setup, teardown, notifications, and file work.
@qawolf/flows/cli is the smallest platform entry point in @qawolf/flows. Node flows run in Node and have no browser or mobile driver. Use them for work that needs to coordinate with other flows in a run but doesn’t require UI interaction — data setup, teardown, sending notifications, or processing files.Because Node flows run in Node, you can use the Node standard library directly for file, process, and network work:
The callback receives the Node flow context.Public callback parameters:
inputs — values published by an upstream flow in the same run
setOutput(...) — publishes values for downstream flows to read
test(...) — wraps named sub-steps that appear in your results
Node flows do not receive page, driver, or any other launch object.
test(...) can be omitted for simple flows where grouping steps into named sub-steps doesn’t add value. For most flows, wrapping steps in test(...) is recommended — the label appears in your results and makes failures easier to locate.
testContextDependencies is exported for runner and tooling integration. Flow authors should usually use the public callback parameters above instead of depending on the raw runner dependency list.
The exported expect is a re-export of the expect package — the same assertion library Jest uses. Use Jest’s expect reference for the full matcher list (toBe, toEqual, toMatchObject, toThrow, etc.).Always import expect from @qawolf/flows/cli rather than from expect or jest directly, so that future QA Wolf extensions stay in effect.Example: