docs(expect): say poll and toPass default to the configured timeouts
Merged
LE
2d ago+27+27+01234567890123456789-6-6-0123456789
What
The PollOptions and PassOptions doc comments now name the defaults the code uses: in an e2e test, suite hook, or openHost() session, config.assertionTimeout for expect.poll and config.toPass (when the context supplies it) for toPass(); otherwise the built-in values. PassOptions is also the type of config.toPass, so its comments cover both uses. Same text in docs/reference/expect.mdx, which copies the types.
Why
PollOptions.timeoutsaid "Default 5000", but in an e2e test, suite hook, oropenHost()sessionexpect.pollusesconfig.assertionTimeout(packages/e2e/src/expect/poll.ts:67). The options table in the same page already says so.PassOptions.timeoutsaid only the phase deadline applies, andintervalsgave a fixed default, buttoPass()readsconfig.toPassfirst (packages/e2e/src/expect/values.ts:80-81), as the config reference and thetoPassoptions table on the same page describe. Outside them it falls back to0(which isINVALID_CONFIGthere,retry.ts:111) and[100, 250, 500, 1000].
How it works
packages/core/src/types.ts:1446,1460,1466: rewrite the three comments.docs/reference/expect.mdx:1269,1310,1316: the same text in the copied blocks..changeset/correct-expect-defaults.md: patch note for@e2e-dev/core.
Issue
None; docs-only (no behavior change).
Verified
Ran it locally: yes
Docs-only, so the check is the full gate on this branch, plus the tests that already pin the configured defaults (open-host-deadline.test.ts:12,28, expect-poll-scope.test.ts:596).
$ pnpm check
check exit=0
$ pnpm test
e2e Test Files 398 passed | 1 skipped (399) Tests 6593 passed | 15 skipped (6608)
@e2e-dev/web Test Files 100 passed (100) Tests 1217 passed | 61 skipped (1278)
@e2e-dev/core Test Files 4 passed (4) Tests 130 passed (130)
(other packages all passed)
test exit=0
- No rendered-page screenshot: the change is comment text inside a code block, and the diff shows all of it.
Checklist
- Changeset added (
pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only. - Breaking change: title carries
!, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md). - Docs updated in the same PR: the
docs/**/*.mdxpage for the behavior, andskills/e2e/if the skill describes it. - Contract change: emitted
.d.tsreviewed,tests/types/sdk-types.tsupdated; wire change edits the schema and both fixtures. - Engine contract change (
e2e/engine): changesets fore2e,@e2e-dev/web, and@e2e-dev/mobile.