-
-
Notifications
You must be signed in to change notification settings - Fork 82
docs(anchor): document add custom anchor #769
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
Conversation
✅ Deploy Preview for cn-vitest ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
这个pr合并完毕,建议和主文档进行一次合并。 |
|
@coderabbitai 兔子 检查一下这个 pr |
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.
Pull Request Overview
This PR adds anchor links (fragment identifiers) to section headings throughout Chinese documentation files for improved navigation and deep linking capabilities. It also fixes a broken link reference in the VitePress configuration file (changing trace-viewer to trace-view).
- Added anchor links to hundreds of section headings using the
{#anchor-name}syntax - Fixed a broken link in
.vitepress/config.tsfromtrace-viewertotrace-view - Applied consistent anchor naming patterns across all documentation files
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| guide/snapshot.md | Added anchor links to 4 subsection headings about Jest compatibility differences |
| guide/mocking.md | Added anchor links to main heading and multiple subsection headings for mocking cheat sheet |
| guide/migration.md | Added anchor links to migration guide sections covering Vitest 4.0 changes and Jest migration |
| guide/improving-performance.md | Added anchor links to performance optimization sections |
| guide/coverage.md | Added anchor link to examples section |
| guide/comparisons.md | Added anchor link to main comparison heading |
| guide/browser/why.md | Added anchor links to browser mode motivation and drawbacks sections |
| guide/browser/webdriverio.md | Added anchor link to main WebdriverIO configuration heading |
| guide/browser/visual-regression-testing.md | Added anchor links to all sections covering visual regression testing setup and best practices |
| guide/browser/trace-view.md | Changed main heading from "Trace Viewer" to "Trace View" for consistency |
| guide/browser/playwright.md | Added anchor link to main Playwright configuration heading |
| guide/browser/multiple-setups.md | Added anchor links to sections about browser setup configurations |
| guide/browser/locators.md | Added anchor link to main locators heading |
| guide/browser/index.md | Added anchor links to installation, configuration, and limitations sections |
| guide/browser/context.md | Added anchor link to context API heading |
| guide/browser/config.md | Added anchor link to browser config reference heading |
| guide/browser/component-testing.md | Added anchor links to all component testing sections and subsections |
| guide/browser/commands.md | Added anchor links to built-in commands and custom commands sections |
| guide/browser/assertion-api.md | Added anchor link to toMatchScreenshot section |
| config/index.md | Added anchor link to main configuration heading |
| blog.md | Added anchor link to blog heading |
| api/index.md | Added anchor link to Test API reference heading |
| advanced/runner.md | Added anchor links to runner API sections |
| advanced/reporters.md | Added anchor links to reporter extension sections |
| advanced/metadata.md | Added anchor link to task metadata heading |
| advanced/api/vitest.md | Added anchor links to experimental API sections |
| advanced/api/reporters.md | Added anchor link to reporters heading |
| advanced/api/index.md | Added anchor link to getting started section |
| .vitepress/config.ts | Fixed broken link from trace-viewer to trace-view |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ::: | ||
|
|
||
| ### 对模块中导出的函数进行 mock。 | ||
| ### 对模块中导出的函数进行 mock。{#mock-an-exported-function} |
Copilot
AI
Nov 3, 2025
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.
Missing space before the anchor link. The pattern should be '### 对模块中导出的函数进行 mock。 {#mock-an-exported-function}' with a space between the period and the opening brace, consistent with other headings in the file.
| Vitest为多个框架提供全面的组件测试支持,包括Vue、React、Svelte、Lit、Preact、Qwik、Solid、Marko等。本指南涵盖了使用Vitest有效测试组件的特定模式、工具和最佳实践。 | ||
|
|
||
| ## 为什么进行组件测试? | ||
| ## 为什么进行组件测试?{#why-component-testing} |
Copilot
AI
Nov 3, 2025
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.
Missing space before the anchor link. The pattern should be '## 为什么进行组件测试? {#why-component-testing}' with a space between the question mark and the opening brace, consistent with the spacing pattern used throughout the PR.
| Vitest中的组件测试使用**浏览器模式**在真实浏览器环境中运行测试,支持使用Playwright、WebdriverIO或预览模式。这提供了最准确的测试环境,因为你的组件在真实浏览器中运行,具有实际的DOM实现、CSS渲染和浏览器API。 | ||
|
|
||
| ### 为什么使用浏览器模式? | ||
| ### 为什么使用浏览器模式?{#why-browser-mode} |
Copilot
AI
Nov 3, 2025
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.
Missing space before the anchor link. The pattern should be '### 为什么使用浏览器模式? {#why-browser-mode}' with a space between the question mark and the opening brace, consistent with the spacing pattern used throughout the PR.
|
可以看看 copilot 检查的对不对 |
#741
#742