Skip to content

Commit

Permalink
docs: restructure the sudebar, update TestRunResult type
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Dec 2, 2024
1 parent 51c891a commit 2d421a5
Show file tree
Hide file tree
Showing 20 changed files with 922 additions and 790 deletions.
84 changes: 65 additions & 19 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default ({ mode }: { mode: string }) => {
items: [
{
text: 'Advanced API',
link: '/advanced/api',
link: '/advanced/api/',
activeMatch: '^/advanced/',
},
{
Expand Down Expand Up @@ -243,16 +243,62 @@ export default ({ mode }: { mode: string }) => {
},
],
},
footer(),
{
items: [
...footer(),
{
text: 'Node API Reference',
link: '/advanced/api/',
},
],
},
],
'/advanced': [
{
text: 'API',
collapsed: false,
items: [
{
text: 'Vitest Node API',
link: '/advanced/api',
text: 'Node API',
items: [
{
text: 'Getting Started',
link: '/advanced/api/',
},
{
text: 'Vitest',
link: '/advanced/api/vitest',
},
{
text: 'TestProject',
link: '/advanced/api/test-project',
},
{
text: 'TestSpecification',
link: '/advanced/api/test-specification',
},
],
},
{
text: 'Test Task API',
items: [
{
text: 'TestCase',
link: '/advanced/api/test-case',
},
{
text: 'TestSuite',
link: '/advanced/api/test-suite',
},
{
text: 'TestModule',
link: '/advanced/api/test-module',
},
{
text: 'TestCollection',
link: '/advanced/api/test-collection',
},
],
},
{
text: 'Runner API',
Expand Down Expand Up @@ -282,7 +328,9 @@ export default ({ mode }: { mode: string }) => {
},
],
},
footer(),
{
items: footer(),
},
],
'/team': [],
'/': [
Expand All @@ -308,7 +356,7 @@ export default ({ mode }: { mode: string }) => {
link: '/guide/browser',
},
{
text: 'Advanced API',
text: 'Node API Reference',
link: '/advanced/api',
},
{
Expand All @@ -325,19 +373,17 @@ export default ({ mode }: { mode: string }) => {
}))
}

function footer(): DefaultTheme.SidebarItem {
return {
items: [
{
text: 'Config Reference',
link: '/config/',
},
{
text: 'Test API Reference',
link: '/api/',
},
],
}
function footer(): DefaultTheme.SidebarItem[] {
return [
{
text: 'Config Reference',
link: '/config/',
},
{
text: 'Test API Reference',
link: '/api/',
},
]
}

function introduction(): DefaultTheme.SidebarItem[] {
Expand Down
Loading

0 comments on commit 2d421a5

Please sign in to comment.