Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e7db97f
!docs: recovery /guide/migration
NoiseFan Nov 12, 2025
9eb6397
!docs: recovery /guide/coverage
NoiseFan Nov 12, 2025
3f797e9
!docs: recovery /guide/reporters
NoiseFan Nov 12, 2025
8e703f6
!docs: recovery /guide/profiling-test-performance
NoiseFan Nov 12, 2025
b1011c3
!docs: recovery /guide/index
NoiseFan Nov 13, 2025
1e8df5f
!docs: recovery /guide/features
NoiseFan Nov 15, 2025
939aa89
!docs: recovery /api/index
NoiseFan Nov 15, 2025
3c2087b
!docs: recovery /api/mock
NoiseFan Nov 16, 2025
54ec728
!docs: recovery /api/vi
NoiseFan Nov 16, 2025
463b301
!docs: recovery /api/vi
NoiseFan Nov 16, 2025
723b7d9
!docs: recovery /guide/filtering
NoiseFan Nov 18, 2025
2ec45b4
!docs: recovery /guide/projects
NoiseFan Nov 18, 2025
763a739
!docs: recovery /guide/snapshot
NoiseFan Nov 18, 2025
0c65223
!docs: recovery /guide/coverage
NoiseFan Nov 18, 2025
dae59a2
!docs: recovery /guide/ui
NoiseFan Nov 18, 2025
bc56ade
!docs: recovery /guide/cli
NoiseFan Nov 18, 2025
9ffed01
!docs: recovery /guide/mocking
NoiseFan Nov 23, 2025
8239279
!docs: remove extra files
NoiseFan Nov 23, 2025
e3913c4
!docs: recovery /guide/parallelism
NoiseFan Nov 23, 2025
2bc5fbc
!docs: recovery /guide/testing-types
NoiseFan Nov 23, 2025
076b1e7
!docs: recovery /guide/in-source
NoiseFan Nov 23, 2025
edfe8d7
!docs: recovery /guide/test-context
NoiseFan Nov 23, 2025
99661d4
!docs: recovery /guide/test-annotations
NoiseFan Nov 23, 2025
5930650
!docs: recovery /guide/test-annotations
NoiseFan Nov 23, 2025
5847c23
!docs: recovery /guide/extending-matchers
NoiseFan Nov 23, 2025
8579162
!docs: recovery /guide/common-errors
NoiseFan Nov 23, 2025
63ca56a
!docs: recovery /guide/debugging
NoiseFan Nov 23, 2025
8cd9c1a
!docs: recovery /guide/improving-performance
NoiseFan Nov 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .vitepress/components/FeaturesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
支持基准测试
</ListItem>
<ListItem>支持套件和测试的过滤、超时、并发配置</ListItem>
<ListItem>支持 <a href="/guide/projects">Projects</a> / <a href="/guide/workspace">Workspace</a></ListItem>
<ListItem>支持 <a href="/guide/projects">Projects</a></ListItem>
<ListItem>
<a href="/guide/snapshot">Jest 快照功能</a>
</ListItem>
Expand All @@ -37,8 +37,8 @@
</ListItem>
<ListItem>
使用
<a target="_blank" href="https://github.com/jsdom/jsdom" rel="noopener noreferrer">jsdom</a> 或
<a target="_blank" href="https://github.com/capricorn86/happy-dom" rel="noopener noreferrer">happy-dom</a>
<a target="_blank" href="https://github.com/capricorn86/happy-dom" rel="noopener noreferrer">happy-dom</a> 或
<a target="_blank" href="https://github.com/jsdom/jsdom" rel="noopener noreferrer">jsdom</a>
模拟 DOM
</ListItem>
<ListItem><a href="/guide/browser/" rel="noopener noreferrer">浏览器模式</a>:在浏览器中运行组件测试</ListItem>
Expand Down
55 changes: 12 additions & 43 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,62 +567,27 @@ function guide(): DefaultTheme.SidebarItem[] {
link: '/guide/reporters',
},
{
text: '测试覆盖率',
text: '覆盖率',
link: '/guide/coverage',
},
{
text: '测试快照',
text: '快照',
link: '/guide/snapshot',
},
{
text: '模拟对象',
text: '模拟',
link: '/guide/mocking',
collapsed: true,
items: [
{
text: '模拟日期',
link: '/guide/mocking/dates',
},
{
text: '模拟函数',
link: '/guide/mocking/functions',
},
{
text: '模拟全局对象',
link: '/guide/mocking/globals',
},
{
text: '模拟模块',
link: '/guide/mocking/modules',
},
{
text: '模拟文件系统',
link: '/guide/mocking/file-system',
},
{
text: '模拟请求',
link: '/guide/mocking/requests',
},
{
text: '模拟计时器',
link: '/guide/mocking/timers',
},
{
text: '模拟类',
link: '/guide/mocking/classes',
},
],
},
{
text: '并行执行',
text: '并行性',
link: '/guide/parallelism',
},
{
text: '类型测试',
link: '/guide/testing-types',
},
{
text: 'UI模式',
text: 'UI 模式',
link: '/guide/ui',
},
{
Expand All @@ -633,6 +598,10 @@ function guide(): DefaultTheme.SidebarItem[] {
text: '测试上下文',
link: '/guide/test-context',
},
{
text: '测试注释',
link: '/guide/test-annotations',
},
{
text: '测试环境',
link: '/guide/environment',
Expand All @@ -659,8 +628,8 @@ function guide(): DefaultTheme.SidebarItem[] {
collapsed: false,
items: [
{
text: '迁移到 Vitest 4.0',
link: '/guide/migration#vitest-4',
text: '迁移到 Vitest 3.0',
link: '/guide/migration#vitest-3',
},
{
text: '从 Jest 迁移',
Expand Down Expand Up @@ -692,7 +661,7 @@ function api(): DefaultTheme.SidebarItem[] {
link: '/api/',
},
{
text: 'Mocks',
text: 'Mock Functions',
link: '/api/mock',
},
{
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/scripts/cli-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const template = options.map((option) => {
const title = option.title
const cli = option.cli
const config = skipConfig.has(title) ? '' : `[${title}](${title.includes('browser.') ? '/guide/browser/config' : '/config/'}#${title.toLowerCase().replace(/\./g, '-')})`
return `### ${title}\n\n- **CLI:** ${cli}\n${config ? `- **Config:** ${config}\n` : ''}\n${option.description}\n`
return `### ${title}\n\n- **命令行终端:** ${cli}\n${config ? `- **配置:** ${config}\n` : ''}\n${option.description}\n`
}).join('\n')

writeFileSync(cliTablePath, template, 'utf-8')
Loading