docs(expect): say poll and toPass default to the configured timeouts

Merged
LE
2d ago
+27-6

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.timeout said "Default 5000", but in an e2e test, suite hook, or openHost() session expect.poll uses config.assertionTimeout (packages/e2e/src/expect/poll.ts:67). The options table in the same page already says so.
  • PassOptions.timeout said only the phase deadline applies, and intervals gave a fixed default, but toPass() reads config.toPass first (packages/e2e/src/expect/values.ts:80-81), as the config reference and the toPass options table on the same page describe. Outside them it falls back to 0 (which is INVALID_CONFIG there, retry.ts:111) and [100, 250, 500, 1000].

How it works

  1. packages/core/src/types.ts:1446,1460,1466: rewrite the three comments.
  2. docs/reference/expect.mdx:1269,1310,1316: the same text in the copied blocks.
  3. .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/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.