Skip to content

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.

NameTypeRequiredDefaultConstraintsDescription
namestringNoAsserts the current top-of-stack route name === this.
paramsEqualsunknownNoAsserts deep-equal against the current route params object.
inStackunknownNo
timeoutMsunknownNomin: 0, integer
expect_route()