@@ -819,7 +819,13 @@ export default ({ mode }: { mode: string }) => {
819819 } ,
820820 ] ,
821821 } ,
822+ // Authoring — how to express a test in code: constructing it,
823+ // asserting, mocking dependencies, attaching metadata. The page is
824+ // about *test content*, not the runner. Discriminator: "How do I
825+ // write X in a test?" If yes, it belongs here. Mocking sub-pages
826+ // live nested because they're a multi-page subtopic.
822827 {
828+ < << << << HEAD
823829 text : '指南' ,
824830 collapsed : false ,
825831 items : [
@@ -845,6 +851,17 @@ export default ({ mode }: { mode: string }) => {
845851 } ,
846852 {
847853 text : '测试运行生命周期' ,
854+ = === ===
855+ text : 'Authoring' ,
856+ collapsed : false ,
857+ items : [
858+ {
859+ text : 'Test Context' ,
860+ link : '/guide/test-context' ,
861+ } ,
862+ {
863+ text : 'Test Run Lifecycle' ,
864+ > >>> >>> 3 a513123224c0041b8cda52ce1f47c912ce05789
848865 link : '/guide/lifecycle' ,
849866 } ,
850867 {
@@ -891,6 +908,7 @@ export default ({ mode }: { mode: string }) => {
891908 ] ,
892909 } ,
893910 {
911+ < << << << HEAD
894912 text : '并行测试' ,
895913 link : '/guide/parallelism' ,
896914 } ,
@@ -917,6 +935,10 @@ export default ({ mode }: { mode: string }) => {
917935 {
918936 text : '内联测试' ,
919937 link : '/guide/in-source' ,
938+ = === ===
939+ text : 'Test Tags' ,
940+ link : '/guide/test-tags' ,
941+ > >>> >>> 3 a513123224c0041b8cda52ce1f47c912ce05789
920942 } ,
921943 {
922944 text : '测试注释' ,
@@ -927,9 +949,77 @@ export default ({ mode }: { mode: string }) => {
927949 link : '/guide/extending-matchers' ,
928950 } ,
929951 {
952+ < << << << HEAD
930953 text : 'IDE 插件' ,
954+ = === ===
955+ text : 'Testing Types' ,
956+ link : '/guide/testing-types' ,
957+ } ,
958+ {
959+ text : 'In-Source Testing' ,
960+ link : '/guide/in-source' ,
961+ } ,
962+ ] ,
963+ } ,
964+ // Workflow — how to invoke, select, and orchestrate test runs
965+ // across files/projects/processes. The page is about the *runner
966+ // and tooling around it*, not what's inside a test. Discriminator:
967+ // "How do I run / filter / parallelize / integrate Vitest?" If a
968+ // page is about the runtime environment of the tests themselves
969+ // (jsdom, node), it still belongs here — that's a workflow choice.
970+ {
971+ text : 'Workflow' ,
972+ collapsed : false ,
973+ items : [
974+ {
975+ text : 'CLI' ,
976+ link : '/guide/cli' ,
977+ } ,
978+ {
979+ text : 'Test Filtering' ,
980+ link : '/guide/filtering' ,
981+ } ,
982+ {
983+ text : 'Test Projects' ,
984+ link : '/guide/projects' ,
985+ } ,
986+ {
987+ text : 'Test Environment' ,
988+ link : '/guide/environment' ,
989+ } ,
990+ {
991+ text : 'Parallelism' ,
992+ link : '/guide/parallelism' ,
993+ } ,
994+ {
995+ text : 'Reporters' ,
996+ link : '/guide/reporters' ,
997+ } ,
998+ {
999+ text : 'Vitest UI' ,
1000+ link : '/guide/ui' ,
1001+ } ,
1002+ {
1003+ text : 'IDE Integration' ,
1004+ > >>> >>> 3 a513123224c0041b8cda52ce1f47c912ce05789
9311005 link : '/guide/ide' ,
9321006 } ,
1007+ ] ,
1008+ } ,
1009+ // Quality & Debugging — how to verify the test run is healthy and
1010+ // diagnose it when it isn't. Coverage, perf, leak detection, error
1011+ // triage, observability. Discriminator: "Is my suite good?" or
1012+ // "Why did this fail / leak / slow down?" If a page primarily
1013+ // measures or fixes the suite (rather than authoring or running
1014+ // it), put it here.
1015+ {
1016+ text : 'Quality & Debugging' ,
1017+ collapsed : false ,
1018+ items : [
1019+ {
1020+ text : 'Coverage' ,
1021+ link : '/guide/coverage' ,
1022+ } ,
9331023 {
9341024 text : '调试' ,
9351025 link : '/guide/debugging' ,
@@ -939,6 +1029,7 @@ export default ({ mode }: { mode: string }) => {
9391029 link : '/guide/common-errors' ,
9401030 } ,
9411031 {
1032+ < << << << HEAD
9421033 text : '迁移指南' ,
9431034 link : '/guide/migration' ,
9441035 collapsed : false ,
@@ -959,6 +1050,9 @@ export default ({ mode }: { mode: string }) => {
9591050 } ,
9601051 {
9611052 text : '性能' ,
1053+ = === ===
1054+ text : 'Performance' ,
1055+ > >>> >>> 3 a513123224c0041b8cda52ce1f47c912ce05789
9621056 collapsed : false ,
9631057 items : [
9641058 {
@@ -977,6 +1071,62 @@ export default ({ mode }: { mode: string }) => {
9771071 } ,
9781072 ] ,
9791073 } ,
1074+ // Recipes — end-to-end patterns that solve a concrete problem by
1075+ // combining multiple features. Each entry is titled by the problem
1076+ // ("Database Transaction per Test"), not the feature. Add a recipe
1077+ // when a single feature page would over-explain, when the value
1078+ // comes from composition, or when users would search by intent
1079+ // rather than by API name.
1080+ {
1081+ text : 'Recipes' ,
1082+ collapsed : false ,
1083+ items : [
1084+ {
1085+ text : 'Database Transaction per Test' ,
1086+ link : '/guide/recipes/db-transaction' ,
1087+ } ,
1088+ {
1089+ text : 'Cancelling Long-Running Operations Gracefully' ,
1090+ link : '/guide/recipes/cancellable' ,
1091+ } ,
1092+ {
1093+ text : 'Waiting for Async Conditions' ,
1094+ link : '/guide/recipes/wait-for' ,
1095+ } ,
1096+ {
1097+ text : 'Type Narrowing in Tests' ,
1098+ link : '/guide/recipes/type-narrowing' ,
1099+ } ,
1100+ {
1101+ text : 'Custom Assertion Helpers' ,
1102+ link : '/guide/recipes/custom-assertions' ,
1103+ } ,
1104+ {
1105+ text : 'Watching Non-Imported Files' ,
1106+ link : '/guide/recipes/watch-templates' ,
1107+ } ,
1108+ {
1109+ text : 'Extending Browser Locators' ,
1110+ link : '/guide/recipes/browser-locators' ,
1111+ } ,
1112+ {
1113+ text : 'Schema-Driven Assertions' ,
1114+ link : '/guide/recipes/schema-matching' ,
1115+ } ,
1116+ {
1117+ text : 'Auto-Cleanup with `using`' ,
1118+ link : '/guide/recipes/explicit-resources' ,
1119+ } ,
1120+ {
1121+ text : 'Per-File Isolation Settings' ,
1122+ link : '/guide/recipes/disable-isolation' ,
1123+ } ,
1124+ {
1125+ text : 'Parallel and Sequential Test Files' ,
1126+ link : '/guide/recipes/parallel-sequential' ,
1127+ } ,
1128+ ] ,
1129+ } ,
9801130 {
9811131 text : '高级指南' ,
9821132 collapsed : true ,
@@ -999,14 +1149,41 @@ export default ({ mode }: { mode: string }) => {
9991149 } ,
10001150 ] ,
10011151 } ,
1152+ // Migration — one-time transitional content: cross-version
1153+ // upgrades and porting from other test runners (Jest, Mocha).
1154+ // Sits near the bottom because it's not daily-use and would push
1155+ // active-use guides further from the user's first scroll.
10021156 {
1157+ text : 'Migration' ,
1158+ link : '/guide/migration' ,
1159+ collapsed : false ,
10031160 items : [
10041161 {
1162+ < << << << HEAD
10051163 text : '测试技巧' ,
10061164 link : '/guide/recipes' ,
10071165 } ,
10081166 {
10091167 text : '测试框架比较' ,
1168+ = === ===
1169+ text : 'Migrating to Vitest 4.0' ,
1170+ link : '/guide/migration#vitest-4' ,
1171+ } ,
1172+ {
1173+ text : 'Migrating from Jest' ,
1174+ link : '/guide/migration#jest' ,
1175+ } ,
1176+ {
1177+ text : 'Migrating from Mocha + Chai + Sinon' ,
1178+ link : '/guide/migration#mocha-chai-sinon' ,
1179+ } ,
1180+ ] ,
1181+ } ,
1182+ {
1183+ items : [
1184+ {
1185+ text : 'Comparisons' ,
1186+ > >>> >>> 3 a513123224c0041b8cda52ce1f47c912ce05789
10101187 link : '/guide/comparisons' ,
10111188 } ,
10121189 ] ,
0 commit comments