docs(cn): update guide/lifecycle#938
Merged
Merged
Conversation
✅ Deploy Preview for cn-vitest ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
将 Vitest 指南中的部分文档从英文标题/内容本地化为中文,并补充了章节锚点以便站内导航与引用。
Changes:
- 将
guide/test-annotations.md的 frontmatter 标题本地化为中文。 - 将
guide/lifecycle.md全文翻译为中文,并为主要标题/小节补充锚点。 - 调整示例代码注释与术语表述以匹配中文语境。
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| guide/test-annotations.md | 将页面标题与现有中文内容对齐。 |
| guide/lifecycle.md | 将“测试运行生命周期”指南整体翻译为中文并加入锚点;包含若干列表/排版细节调整。 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+131
to
+138
| 5. **对于每个测试:**: | ||
| - [`aroundEach`](/api/hooks#aroundeach) 钩子包裹该测试(须调用 `runTest()`) | ||
| - `beforeEach` 钩子执行(按定义顺序,或基于 [`sequence.hooks`](/config/sequence#sequence-hooks)) | ||
| - 测试函数执行 | ||
| - `afterEach` 钩子执行(默认以 `sequence.hooks: 'stack'` 倒序执行) | ||
| - [`onTestFinished`](/api/hooks#ontestfinished) 回调执行(始终倒序) | ||
| - 如果测试失败:[`onTestFailed`](/api/hooks#ontestfailed) 回调执行 | ||
| - 注意:如果设置了 `repeats` 或 `retry`,上述所有步骤会再次执行 |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在提交PR之前,请确保您执行以下操作:
fixes #123)。描述
附加上下文