Skip to content

Commit d267bf6

Browse files
committed
docs: restructure the sudebar, update TestRunResult type
1 parent 26e2b66 commit d267bf6

20 files changed

Lines changed: 922 additions & 790 deletions

docs/.vitepress/config.ts

Lines changed: 65 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default ({ mode }: { mode: string }) => {
146146
items: [
147147
{
148148
text: 'Advanced',
149-
link: '/advanced/api',
149+
link: '/advanced/api/',
150150
activeMatch: '^/advanced/',
151151
},
152152
{
@@ -243,16 +243,62 @@ export default ({ mode }: { mode: string }) => {
243243
},
244244
],
245245
},
246-
footer(),
246+
{
247+
items: [
248+
...footer(),
249+
{
250+
text: 'Node API Reference',
251+
link: '/advanced/api/',
252+
},
253+
],
254+
},
247255
],
248256
'/advanced': [
249257
{
250258
text: 'API',
251259
collapsed: false,
252260
items: [
253261
{
254-
text: 'Vitest Node API',
255-
link: '/advanced/api',
262+
text: 'Node API',
263+
items: [
264+
{
265+
text: 'Getting Started',
266+
link: '/advanced/api/',
267+
},
268+
{
269+
text: 'Vitest',
270+
link: '/advanced/api/vitest',
271+
},
272+
{
273+
text: 'TestProject',
274+
link: '/advanced/api/test-project',
275+
},
276+
{
277+
text: 'TestSpecification',
278+
link: '/advanced/api/test-specification',
279+
},
280+
],
281+
},
282+
{
283+
text: 'Test Task API',
284+
items: [
285+
{
286+
text: 'TestCase',
287+
link: '/advanced/api/test-case',
288+
},
289+
{
290+
text: 'TestSuite',
291+
link: '/advanced/api/test-suite',
292+
},
293+
{
294+
text: 'TestModule',
295+
link: '/advanced/api/test-module',
296+
},
297+
{
298+
text: 'TestCollection',
299+
link: '/advanced/api/test-collection',
300+
},
301+
],
256302
},
257303
{
258304
text: 'Runner API',
@@ -282,7 +328,9 @@ export default ({ mode }: { mode: string }) => {
282328
},
283329
],
284330
},
285-
footer(),
331+
{
332+
items: footer(),
333+
},
286334
],
287335
'/team': [],
288336
'/': [
@@ -308,7 +356,7 @@ export default ({ mode }: { mode: string }) => {
308356
link: '/guide/browser',
309357
},
310358
{
311-
text: 'Advanced API',
359+
text: 'Node API Reference',
312360
link: '/advanced/api',
313361
},
314362
],
@@ -321,19 +369,17 @@ export default ({ mode }: { mode: string }) => {
321369
}))
322370
}
323371

324-
function footer(): DefaultTheme.SidebarItem {
325-
return {
326-
items: [
327-
{
328-
text: 'Config Reference',
329-
link: '/config/',
330-
},
331-
{
332-
text: 'Test API Reference',
333-
link: '/api/',
334-
},
335-
],
336-
}
372+
function footer(): DefaultTheme.SidebarItem[] {
373+
return [
374+
{
375+
text: 'Config Reference',
376+
link: '/config/',
377+
},
378+
{
379+
text: 'Test API Reference',
380+
link: '/api/',
381+
},
382+
]
337383
}
338384

339385
function introduction(): DefaultTheme.SidebarItem[] {

0 commit comments

Comments
 (0)