-
-
Notifications
You must be signed in to change notification settings - Fork 111
docs(en): merge docs-cn/sync-docs into docs-cn/dev @ 93d506c0 #971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8a09f2e
349422d
b2af5d5
93d506c
a885f26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,11 +105,17 @@ | |
|
|
||
| ```ts | ||
| interface ExpectPoll extends ExpectStatic { | ||
| (actual: () => T, options?: { interval?: number; timeout?: number; message?: string }): Promise<Assertions<T>> | ||
| (actual: (options: { signal: AbortSignal }) => T, options?: { interval?: number; timeout?: number; message?: string }): Promise<Assertions<Awaited<T>>> | ||
| } | ||
| ``` | ||
|
|
||
| <<<<<<< HEAD | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Useful? React with 👍 / 👎. |
||
| `expect.poll` 重新运行断言,直到成功为止。你可以通过设置 `interval` 和 `timeout` 选项来配置 Vitest 应重新运行 `expect.poll` 回调的次数。 | ||
| ======= | ||
| `expect.poll` reruns the _assertion_ until it is succeeded. You can configure how often Vitest retries and how long it waits by setting `interval` and `timeout` options. The `timeout` applies to the whole polling operation, including pending callback and async matcher execution. | ||
|
|
||
| The callback receives an `AbortSignal` that is aborted when the poll timeout is reached. | ||
| >>>>>>> 93d506c0d3a604ea067f8e4b69315ce75ccceb1b | ||
|
|
||
| 如果在 `expect.poll` 回调中抛出错误,Vitest 将重试直到超时为止。 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,8 +41,13 @@ | |
|
|
||
| ::: | ||
|
|
||
| <<<<<<< HEAD | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The guide index contains unresolved merge markers around the requirements tip, so the page now includes raw conflict text and two contradictory requirement statements. Because this is inside a VitePress admonition block, leaving it unresolved can also disrupt the intended block structure and confuse readers about the actual minimum versions. Useful? React with 👍 / 👎. |
||
| :::tip 提示 | ||
| Vitest 需要 Vite >=v6.0.0 和 Node >=v20.0.0 | ||
| ======= | ||
| :::tip | ||
| Vitest requires Vite >=v6.4.0 and Node >=v22.12.0 | ||
| >>>>>>> 93d506c0d3a604ea067f8e4b69315ce75ccceb1b | ||
| ::: | ||
|
|
||
| 如果在 `package.json` 中安装一份 `vitest` 的副本,可以使用上面列出的方法之一。然而,如果更倾向于直接运行 `vitest` ,可以使用 `npx vitest`( `npx` 会随着 npm 和 Node.js 一起被安装)。 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section still contains unresolved conflict markers (
<<<<<<<,=======,>>>>>>>), so the docs will publish raw merge artifacts instead of a coherent paragraph. In this file it also sits inside a::: tipblock, making the rendered guidance unreliable and hard to read for users until one side is selected and the markers are removed.Useful? React with 👍 / 👎.