You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fd145d8
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/api/expect.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ The callback receives an `AbortSignal` that is aborted when the poll timeout is
118
118
119
119
If an error is thrown inside the `expect.poll` callback, Vitest will retry again until the timeout runs out.
120
120
121
-
The `message` option describes what the poll waits for. If the poll fails, Vitest adds the message to the start of the error.
121
+
The `message` option describes what the poll waits for. If the poll fails, Vitest adds the message to the start of the error. The message also names the step in the [trace timeline](/config/experimental#experimental-tracetimeline).
If`vi.useFakeTimers`isused, `vi.waitFor`automaticallycalls`vi.advanceTimersByTime(interval)`ineverycheckcallback. See [AutomaticAdvancing](/guide/mocking/timers#automatic-advancing) fordetails.
If`vi.useFakeTimers`isused, `vi.waitUntil`automaticallycalls`vi.advanceTimersByTime(interval)`ineverycheckcallback. See [AutomaticAdvancing](/guide/mocking/timers#automatic-advancing) fordetails.
Copy file name to clipboardExpand all lines: docs/config/experimental.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -485,6 +485,8 @@ Steps are reported only for failed attempts, so the option adds almost no overhe
485
485
486
486
Step locations are resolved like error stacks, so a step in a helper file points at that file, and a step in a [`vi.defineHelper`](/api/vi#vi-definehelper) helper points at the line that called the helper.
487
487
488
+
The `message` option of `expect.poll`, `vi.waitFor`, and `vi.waitUntil` names the step, as with `user saved (vi.waitUntil)` in the report above.
489
+
488
490
This option has no effect in browser mode, which prints the same timeline with [`browser.traceView`](/config/browser/traceview).
0 commit comments