Skip to content

Commit

Permalink
docs: split browser page (#5988)
Browse files Browse the repository at this point in the history
Co-authored-by: Vladimir <[email protected]>
  • Loading branch information
userquin and sheremet-va authored Jul 1, 2024
1 parent e9b638d commit 50130bd
Show file tree
Hide file tree
Showing 14 changed files with 1,263 additions and 1,210 deletions.
28 changes: 27 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,33 @@ export default ({ mode }: { mode: string }) => {
},
{
text: 'Browser Mode',
link: '/guide/browser',
link: '/guide/browser/',
collapsed: true,
items: [{
text: 'Assertion API',
link: '/guide/browser/assertion-api',
docFooterText: 'Assertion API | Browser Mode',
}, {
text: 'Retry-ability',
link: '/guide/browser/retry-ability',
docFooterText: 'Retry-ability | Browser Mode',
}, {
text: 'Context',
link: '/guide/browser/context',
docFooterText: 'Context | Browser Mode',
}, {
text: 'Interactivity API',
link: '/guide/browser/interactivity-api',
docFooterText: 'Interactivity API | Browser Mode',
}, {
text: 'Commands',
link: '/guide/browser/commands',
docFooterText: 'Commands | Browser Mode',
}, {
text: 'Examples',
link: '/guide/browser/examples',
docFooterText: 'Examples | Browser Mode',
}],
},
{
text: 'In-Source Testing',
Expand Down
8 changes: 4 additions & 4 deletions docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ or [`happy-dom`](https://github.com/capricorn86/happy-dom) instead.
If you are building edge functions, you can use [`edge-runtime`](https://edge-runtime.vercel.app/packages/vm) environment

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

By adding a `@vitest-environment` docblock or comment at the top of the file,
Expand Down Expand Up @@ -1507,7 +1507,7 @@ Listen to port and serve API. When set to true, the default port is 51204
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.
::: tip NOTE
Read more about testing in a real browser in the [guide page](/guide/browser).
Read more about testing in a real browser in the [guide page](/guide/browser/).
:::
::: warning
Expand Down Expand Up @@ -1697,7 +1697,7 @@ The script `src` and `content` will be processed by Vite plugins.
- **Type:** `Record<string, BrowserCommand>`
- **Default:** `{ readFile, writeFile, ... }`
Custom [commands](/guide/browser#commands) that can be import during browser tests from `@vitest/browser/commands`.
Custom [commands](/guide/browser/commands) that can be import during browser tests from `@vitest/browser/commands`.
### clearMocks
Expand Down Expand Up @@ -2308,7 +2308,7 @@ The `location` property has `column` and `line` values that correspond to the `t
This option will be auto-enabled if you don't disable it explicitly, and you are running Vitest with:
- [Vitest UI](/guide/ui)
- or using the [Browser Mode](/guide/browser) without [headless](/guide/browser#headless) mode
- or using the [Browser Mode](/guide/browser/) without [headless](/guide/browser/#headless) mode
- or using [HTML Reporter](/guide/reporters#html-reporter)
::: tip
Expand Down
Loading

0 comments on commit 50130bd

Please sign in to comment.