Skip to content

Commit 50130bd

Browse files
docs: split browser page (#5988)
Co-authored-by: Vladimir <[email protected]>
1 parent e9b638d commit 50130bd

File tree

14 files changed

+1263
-1210
lines changed

14 files changed

+1263
-1210
lines changed

docs/.vitepress/config.ts

+27-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,33 @@ export default ({ mode }: { mode: string }) => {
241241
},
242242
{
243243
text: 'Browser Mode',
244-
link: '/guide/browser',
244+
link: '/guide/browser/',
245+
collapsed: true,
246+
items: [{
247+
text: 'Assertion API',
248+
link: '/guide/browser/assertion-api',
249+
docFooterText: 'Assertion API | Browser Mode',
250+
}, {
251+
text: 'Retry-ability',
252+
link: '/guide/browser/retry-ability',
253+
docFooterText: 'Retry-ability | Browser Mode',
254+
}, {
255+
text: 'Context',
256+
link: '/guide/browser/context',
257+
docFooterText: 'Context | Browser Mode',
258+
}, {
259+
text: 'Interactivity API',
260+
link: '/guide/browser/interactivity-api',
261+
docFooterText: 'Interactivity API | Browser Mode',
262+
}, {
263+
text: 'Commands',
264+
link: '/guide/browser/commands',
265+
docFooterText: 'Commands | Browser Mode',
266+
}, {
267+
text: 'Examples',
268+
link: '/guide/browser/examples',
269+
docFooterText: 'Examples | Browser Mode',
270+
}],
245271
},
246272
{
247273
text: 'In-Source Testing',

docs/config/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ or [`happy-dom`](https://github.com/capricorn86/happy-dom) instead.
412412
If you are building edge functions, you can use [`edge-runtime`](https://edge-runtime.vercel.app/packages/vm) environment
413413

414414
::: tip
415-
You can also use [Browser Mode](/guide/browser) to run integration or unit tests in the browser without mocking the environment.
415+
You can also use [Browser Mode](/guide/browser/) to run integration or unit tests in the browser without mocking the environment.
416416
:::
417417

418418
By adding a `@vitest-environment` docblock or comment at the top of the file,
@@ -1507,7 +1507,7 @@ Listen to port and serve API. When set to true, the default port is 51204
15071507
Run Vitest tests in a browser. We use [WebdriverIO](https://webdriver.io/) for running tests by default, but it can be configured with [browser.provider](#browser-provider) option.
15081508

15091509
::: tip NOTE
1510-
Read more about testing in a real browser in the [guide page](/guide/browser).
1510+
Read more about testing in a real browser in the [guide page](/guide/browser/).
15111511
:::
15121512

15131513
::: warning
@@ -1697,7 +1697,7 @@ The script `src` and `content` will be processed by Vite plugins.
16971697
- **Type:** `Record<string, BrowserCommand>`
16981698
- **Default:** `{ readFile, writeFile, ... }`
16991699

1700-
Custom [commands](/guide/browser#commands) that can be import during browser tests from `@vitest/browser/commands`.
1700+
Custom [commands](/guide/browser/commands) that can be import during browser tests from `@vitest/browser/commands`.
17011701

17021702
### clearMocks
17031703

@@ -2308,7 +2308,7 @@ The `location` property has `column` and `line` values that correspond to the `t
23082308

23092309
This option will be auto-enabled if you don't disable it explicitly, and you are running Vitest with:
23102310
- [Vitest UI](/guide/ui)
2311-
- or using the [Browser Mode](/guide/browser) without [headless](/guide/browser#headless) mode
2311+
- or using the [Browser Mode](/guide/browser/) without [headless](/guide/browser/#headless) mode
23122312
- or using [HTML Reporter](/guide/reporters#html-reporter)
23132313

23142314
::: tip

0 commit comments

Comments
 (0)