expect_route
Assert against the navigation state — current route name, current route params, or a route’s presence in the stack. Returns ok when the assertion matches; failResult with code=ASSERTION_FAILED otherwise. Differentiated capability over Maestro: Maestro doesn’t know what route you’re on, only what’s rendered. Pass timeoutMs to retry through navigation animations.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
name | string | No | Asserts the current top-of-stack route name === this. | ||
paramsEquals | unknown | No | Asserts deep-equal against the current route params object. | ||
inStack | string | No | Asserts a route with this name exists somewhere in the stack (not necessarily current). | ||
timeoutMs | number | No | min: 0, integer | Polling timeout in ms (default 0). Use 1000-2000 to wait through navigation animations. |
expect_route()