Skip to content

docs(cn): update guide/lifecycle#938

Merged
NoiseFan merged 3 commits into
vitest-dev:devfrom
NoiseFan:docs/lifecycle
Mar 15, 2026
Merged

docs(cn): update guide/lifecycle#938
NoiseFan merged 3 commits into
vitest-dev:devfrom
NoiseFan:docs/lifecycle

Conversation

@NoiseFan
Copy link
Copy Markdown
Collaborator

在提交PR之前,请确保您执行以下操作:

  • 曾阅读过翻译须知
  • 检查是否已经有PR以同样的方式解决问题,以避免创建重复。
  • 在此PR中描述正在解决的问题,或引用它解决的问题(例如:fixes #123)。

描述

附加上下文

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 15, 2026

Deploy Preview for cn-vitest ready!

Name Link
🔨 Latest commit f94edc2
🔍 Latest deploy log https://app.netlify.com/projects/cn-vitest/deploys/69b68fd60dd6b90008f3f437
😎 Deploy Preview https://deploy-preview-938--cn-vitest.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@NoiseFan NoiseFan merged commit 356db82 into vitest-dev:dev Mar 15, 2026
5 checks passed
@thinkasany thinkasany requested a review from Copilot March 15, 2026 10:55
@NoiseFan NoiseFan deleted the docs/lifecycle branch March 15, 2026 10:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread guide/lifecycle.md
Comment thread guide/lifecycle.md
Comment thread guide/lifecycle.md
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`,上述所有步骤会再次执行
Comment thread guide/lifecycle.md
Comment thread guide/lifecycle.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants