Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
4e6f0d7
Initial plan
Copilot Oct 19, 2025
04deffc
docs: update pretty-format references to @vitest/pretty-format
Copilot Oct 19, 2025
f245afb
docs: add README for @vitest/pretty-format package
Copilot Oct 19, 2025
b03ef7a
docs: typo in reporters guide (#8738)
vahiwe Oct 20, 2025
4859540
chore(deps): update dependency eslint to ^9.38.0 (#8742)
renovate[bot] Oct 20, 2025
db56cdd
chore(deps): update actions/setup-node action to v6 (#8743)
renovate[bot] Oct 20, 2025
18c4b3d
fix(module-runner): resolve `resolvedSources` correctly (#8736)
sheremet-va Oct 21, 2025
3a5f384
fix(browser): allow service workers to mock the network in chromium w…
Georgegriff Oct 21, 2025
2bcce30
fix(module-runner): support getBuiltins (#8746)
sheremet-va Oct 21, 2025
303c0db
docs: correct typos in migration guide (#8750)
vahiwe Oct 21, 2025
adc2222
ci: proper playwright deps caching (#8744)
AriPerkkio Oct 21, 2025
056db9d
Update comparisons.md with Mocha Comparisons (#8740)
AlexanderKaran Oct 21, 2025
b6e0efc
feat!: rewrite pools without `tinypool` (#8705)
AriPerkkio Oct 21, 2025
1cd53fc
fix(browser): support sync `not.toBeInTheDocument()` (#8751)
sheremet-va Oct 21, 2025
205c61e
chore: release v4.0.0-beta.19
sheremet-va Oct 21, 2025
d5cdadc
ci: add permissions to ecosystem-ci-trigger
sheremet-va Oct 21, 2025
01c6871
docs: rename to `vmMemoryLimit`
sheremet-va Oct 21, 2025
ecad1bf
docs: clarify the timeout number is supported
sheremet-va Oct 21, 2025
b07f049
chore: remove useless comments
sheremet-va Oct 21, 2025
51220b8
ci: use Node 22 on mac and windows (#8753)
sheremet-va Oct 21, 2025
c6e3d5d
fix(pool): properly reuse the vm pool (#8758)
sheremet-va Oct 22, 2025
c796f5b
perf(pool): resolve all environments first (#8759)
sheremet-va Oct 22, 2025
7898547
fix: `base` option doesn't crash vitest (#8760)
sheremet-va Oct 22, 2025
700cc06
chore: remove vite-node from the monorepo (#8761)
sheremet-va Oct 22, 2025
6f6a2e4
perf: create only one fetcher per project (#8762)
sheremet-va Oct 22, 2025
00b5ce5
docs: vitest 4 blog post (#8724)
sheremet-va Oct 22, 2025
dc806a5
chore(ui): use vitest-browser-vue for UI tests, remove auto loading, …
sheremet-va Oct 22, 2025
05b582e
chore: release v4.0.0
sheremet-va Oct 22, 2025
33de4ad
fix: move the `getBuiltins` check (#8765)
sheremet-va Oct 22, 2025
4ef1850
fix(pool): don't teardown the communication channel too soon if somet…
sheremet-va Oct 22, 2025
f7c0ac3
chore: release v4.0.1
sheremet-va Oct 22, 2025
35ec170
docs: add v3 link
sheremet-va Oct 22, 2025
b31e100
fix(pool): assign envs before running tests to keep in sync with proc…
sheremet-va Oct 23, 2025
75a430c
docs: fix tomatchscreenshot link in vitest 4 blog post (#8772)
mdong1909 Oct 23, 2025
1237b28
fix(browser): don't print the deprecation notice in node_modules (#8779)
sheremet-va Oct 23, 2025
79eff82
fix(spy): properly inherit implementation's `length` (#8778)
sheremet-va Oct 23, 2025
2fb391f
fix(spy): reset spies if both `restoreMocks` and `mockReset` is set i…
sheremet-va Oct 23, 2025
783cead
chore: keep length static (#8782)
sheremet-va Oct 23, 2025
121560e
chore: release v4.0.2
sheremet-va Oct 23, 2025
279cdd9
docs: vitest 4 blog rename imports playwright -> webdriverio, preview…
Johncw10 Oct 24, 2025
cdd750d
docs: fix coverage.exclude in the migration guide
sheremet-va Oct 24, 2025
9c966fa
fix(happy-dom): support fetch globals (#8791)
sheremet-va Oct 24, 2025
18f0b29
fix(init): use correct jsx/tsx extension (#8792)
sheremet-va Oct 24, 2025
c14c4fc
fix: preserve reporter options from config when CLI reporters overrid…
Copilot Oct 24, 2025
9cfe1c0
fix(browser): more stable in-source testing validation (#8793)
sheremet-va Oct 24, 2025
f71e2d4
chore: ask AI not to add useless comments
sheremet-va Oct 24, 2025
9966adf
chore: release v4.0.3
sheremet-va Oct 24, 2025
20395eb
fix(browser): correct typo (#8796)
benmccann Oct 24, 2025
cc97173
perf(utils): optimized reducer to avoid creating new objects (#8818)
Connormiha Oct 26, 2025
8e9c0f0
fix(pool): runner's error listener causing `MaxListenersExceededWarni…
AriPerkkio Oct 26, 2025
a2cb0f4
docs(migration): `singleThread` to mention `isolate: false` (#8822)
AriPerkkio Oct 26, 2025
0b0743d
fix(worker): rpc listener leak when `isolate: false` (#8821)
AriPerkkio Oct 26, 2025
d4a5cad
docs(browser): fix manual installation guide (#8823)
sheremet-va Oct 26, 2025
3dc3e1f
fix(browser): publish a missing context file for webdriverio (#8824)
sheremet-va Oct 26, 2025
e1b66c8
docs(migration): mention `mock.settledResults` (#8825)
sheremet-va Oct 26, 2025
2e41447
docs: change instance property from 'name' to 'browser' (#8834)
fengmk2 Oct 27, 2025
1cafcf6
fix(mocker): support mocking builtins without `node:` prefix (#8829)
sheremet-va Oct 27, 2025
2de7608
test: add test to detect event listeners leak warnings (#8827)
AriPerkkio Oct 27, 2025
a4176c2
fix(pool): capture workers `stdio` to logger (#8809)
AriPerkkio Oct 27, 2025
f166459
test: set group order on coverage tests (#8807)
AriPerkkio Oct 27, 2025
afdf75e
chore: update URLs (#8806)
iiio2 Oct 27, 2025
70ea4d2
docs: very minor typo in blogpost (#8804)
lishaduck Oct 27, 2025
d945c03
fix(spy): allow classes in `vi.mocked` utility (#8839)
sheremet-va Oct 27, 2025
dbbf614
chore: release v4.0.4
sheremet-va Oct 27, 2025
ecbe276
perf(expect): optimize checking the input type (#8840)
Connormiha Oct 27, 2025
d1cbaae
chore: bump node version to lts (#8846)
iiio2 Oct 28, 2025
0b9862e
docs(config): Fix a typo in the config docs (#8847)
menewman Oct 28, 2025
7f67af9
fix(browser): allow `Locator` type in selectOptions element parameter…
rzzf Oct 28, 2025
d5cebff
perf: pass testfiles at once when `--no-isolate --maxWorkers=1` (#8835)
AriPerkkio Oct 28, 2025
0dfe68c
fix(pool): rename `groupId` to `groupOrder` in error message (#8856)
Yohannfra Oct 29, 2025
e47e3a6
fix: respect `ssr.noExternal` when externalizing dependencies (#8862)
sheremet-va Oct 29, 2025
e0d7c20
fix(module-runner): don't return node builtins for `getBuiltins` unco…
sapphi-red Oct 29, 2025
ff1854d
fix: allow module in --config (#8864)
sheremet-va Oct 29, 2025
6627742
chore: release v4.0.5
sheremet-va Oct 29, 2025
372cdf3
fix: don't merge errors with different diffs for reporting (#8871)
hi-ogawa Oct 30, 2025
30d84d3
fix: do not throw when importing a type from an external package (#8875)
sheremet-va Oct 30, 2025
87c6b9f
docs: fix locator example to use `elements()` method (#8867)
rmjohnson Oct 30, 2025
5968d83
fix(coverage): prevent filtering out virtual files before remapping t…
AriPerkkio Oct 30, 2025
8a5d671
fix(browser): support module tracking (#8877)
sheremet-va Oct 30, 2025
31f8d17
fix: improve spying types (#8878)
sheremet-va Oct 31, 2025
a866876
fix(jsdom): pass down Node.js `FormData` to `Request` (#8880)
sheremet-va Oct 31, 2025
05c148b
fix(happy-dom): properly teardown additional keys (#8888)
sheremet-va Oct 31, 2025
2d551f8
fix: reuse the same environment when `isolate` and `fileParallelism` …
sheremet-va Oct 31, 2025
3111399
fix(browser): ensure setup files are re-evaluated on each test run (f…
yjaaidi Oct 31, 2025
76c203e
docs(coverage): correct `include` glob pattern (#8893)
oller Oct 31, 2025
97fbbd2
chore: release v4.0.6
sheremet-va Oct 31, 2025
9cbaa7a
docs: Improve `onStackTrace` docs to include limitations and tips (#8…
akaltar Nov 2, 2025
be0f07c
perf(reporters): optimize getting the tests stats (#8908)
Connormiha Nov 2, 2025
3fbe7ef
perf(reporters): remove unnecessary `Array.from` call (#8907)
Connormiha Nov 3, 2025
974e3aa
chore(deps): update dependency @antfu/ni to v27 (#8912)
renovate[bot] Nov 3, 2025
9929ad0
fix(pool): avoid `--require` argument when running in deno (#8897)
pi0 Nov 3, 2025
dc46c71
fix: bind `process` in case global is overwritten (#8916)
AriPerkkio Nov 3, 2025
53c9e73
fix(typecheck): handle re-runs outside `tsc` (#8920)
AriPerkkio Nov 3, 2025
f167ea6
perf(pool): sort test files by project by default (#8914)
AriPerkkio Nov 3, 2025
6e17b27
fix(browser): inherit `isolate` option, deprecate `browser.isolate`/`…
sheremet-va Nov 3, 2025
6165d72
fix: create environment once per worker with `isolate: false` (#8915)
sheremet-va Nov 3, 2025
fb82dbe
fix(cli): parse `--execArgv` as array (#8924)
AriPerkkio Nov 3, 2025
196d94c
fix: add Locator as a possible element type in `toContainElement()` m…
vitalybaev Nov 4, 2025
ba20a7e
ci: update node-version for browser tests to 24 (#8929)
sheremet-va Nov 4, 2025
611d22f
chore(deps): update dependency eslint to ^9.39.1 (#8911)
renovate[bot] Nov 4, 2025
4cd4805
chore: cleanup mocking tests (#8932)
sheremet-va Nov 4, 2025
26d365a
fix(jsdom): support `URL.createObjectURL`, `FormData.set(prop, blob)`…
sheremet-va Nov 4, 2025
bade62a
chore: release v4.0.7
sheremet-va Nov 4, 2025
1e94b0c
Initial plan
Copilot Oct 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 3 additions & 35 deletions .github/actions/setup-and-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
node-version:
required: false
description: Node version for setup-node
default: 20.x
default: 24.x

runs:
using: composite
Expand All @@ -14,39 +14,7 @@ runs:
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Set node version to ${{ inputs.node-version }}
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}

- name: Resolve package versions
id: resolve-package-versions
shell: bash
run: >
echo "$(
node -e "
const fs = require('fs');
const lockfile = fs.readFileSync('./pnpm-lock.yaml', 'utf8');
const pattern = (name) => new RegExp(name + ':\\\s+specifier: [\\\s\\\w\\\.^]+version: (\\\d+\\\.\\\d+\\\.\\\d+)');
const playwrightVersion = lockfile.match(pattern('playwright'))[1];
console.log('PLAYWRIGHT_VERSION=' + playwrightVersion);
"
)" >> $GITHUB_OUTPUT

- name: Print versions
shell: bash
run: echo "${{ toJson(steps.resolve-package-versions.outputs) }}"

- name: Check resolved package versions
shell: bash
if: |
contains(fromJSON('[null, "", "undefined"]'), steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION)
run: echo "Failed to resolve package versions. See log above." && exit 1

- name: Cache Playwright v${{ steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION }}
uses: actions/cache@v4
id: playwright-cache
with:
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
key: ${{ runner.os }}-playwright-${{ steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION }}
restore-keys: |
${{ runner.os }}-playwright-
cache: pnpm
43 changes: 43 additions & 0 deletions .github/actions/setup-playwright/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Setup Playwright
description: Setup and cache Playwright browser binaries

runs:
using: composite
steps:
- name: Resolve package versions
id: resolve-package-versions
shell: bash
run: >
echo "$(
node -e "
const fs = require('fs');
const lockfile = fs.readFileSync('./pnpm-lock.yaml', 'utf8');
const pattern = (name) => new RegExp(name + ':\\\s+specifier: [\\\s\\\w\\\.^]+version: (\\\d+\\\.\\\d+\\\.\\\d+)');
const playwrightVersion = lockfile.match(pattern('playwright'))[1];
console.log('PLAYWRIGHT_VERSION=' + playwrightVersion);
"
)" >> $GITHUB_OUTPUT

- name: Print versions
shell: bash
run: echo "${{ toJson(steps.resolve-package-versions.outputs) }}"

- name: Check resolved package versions
shell: bash
if: |
contains(fromJSON('[null, "", "undefined"]'), steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION)
run: echo "Failed to resolve package versions. See log above." && exit 1

- name: Cache Playwright v${{ steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION }}
uses: actions/cache@v4
id: playwright-cache
with:
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
key: ${{ runner.os }}-playwright-${{ steps.resolve-package-versions.outputs.PLAYWRIGHT_VERSION }}
restore-keys: |
${{ runner.os }}-playwright-

- name: Install Playwright Dependencies
shell: bash
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps --only-shell
23 changes: 12 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
- name: Typecheck
run: pnpm run typecheck

- name: Typecheck UI
run: pnpm run -C packages/ui typecheck:client

# From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
- name: Check workflow files
run: |
Expand Down Expand Up @@ -86,9 +89,9 @@ jobs:
node_version: [20, 22, 24]
include:
- os: macos-latest
node_version: 20
node_version: 24
- os: windows-latest
node_version: 20
node_version: 24
fail-fast: false

steps:
Expand All @@ -103,8 +106,7 @@ jobs:
- name: Install
run: pnpm i

- name: Install Playwright Dependencies
run: pnpm exec playwright install chromium --with-deps --only-shell
- uses: ./.github/actions/setup-playwright

- name: Build
run: pnpm run build
Expand All @@ -127,12 +129,13 @@ jobs:

test-browser:
needs: changed
name: 'Browsers: node-20, ${{ matrix.os }}'
name: 'Browsers: node-${{ matrix.node_version }}, ${{ matrix.os }}'
if: needs.changed.outputs.should_skip != 'true'

runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [24]
os:
- macos-latest
- windows-latest
Expand All @@ -145,16 +148,15 @@ jobs:

- uses: ./.github/actions/setup-and-cache
with:
node-version: 20
node-version: ${{ matrix.node_version }}

- uses: browser-actions/setup-chrome@b94431e051d1c52dcbe9a7092a4f10f827795416 # v2.1.0
- uses: browser-actions/setup-firefox@5914774dda97099441f02628f8d46411fcfbd208 # v1.7.0

- name: Install
run: pnpm i

- name: Install Playwright Dependencies
run: pnpm exec playwright install --with-deps --only-shell
- uses: ./.github/actions/setup-playwright

- name: Build
run: pnpm run build
Expand All @@ -167,7 +169,7 @@ jobs:

test-rolldown:
needs: changed
# macos-latest is the fastes one
# macos-latest is the fastest one
name: 'Rolldown&Test: node-22, macos-latest'
if: needs.changed.outputs.should_skip != 'true'
runs-on: macos-latest
Expand All @@ -186,8 +188,7 @@ jobs:
- name: Install
run: pnpm add vite@npm:rolldown-vite && git add . && git commit -m "ci" && pnpm i --prefer-offline --no-frozen-lockfile

- name: Install Playwright Dependencies
run: pnpm exec playwright install --with-deps --only-shell
- uses: ./.github/actions/setup-playwright

- name: Build
run: pnpm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Set node version to 20
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: 20
registry-url: https://registry.npmjs.org/
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ecosystem-ci-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ jobs:
trigger:
runs-on: ubuntu-latest
if: github.repository == 'vitest-dev/vitest' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
permissions:
issues: write # to add / delete reactions, post comments
pull-requests: write # to read PR data, and to add labels
actions: read # to check workflow status
contents: read # to clone the repo
steps:
- uses: actions/github-script@v8
with:
Expand Down Expand Up @@ -70,12 +75,13 @@ jobs:
id: trigger
env:
COMMENT: ${{ github.event.comment.body }}
PR_DATA: ${{ steps.get-pr-data.outputs.result }}
with:
github-token: ${{ steps.generate-token.outputs.token }}
result-encoding: string
script: |
const comment = process.env.COMMENT.trim()
const prData = ${{ steps.get-pr-data.outputs.result }}
const prData = JSON.parse(process.env.PR_DATA)

const suite = comment.split('\n')[0].replace(/^\/ecosystem-ci run/, '').trim()

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0

- name: Set node version to 20
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: 20
registry-url: https://registry.npmjs.org/
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dist
.vite-node
ltex*
.DS_Store
.zed
bench/test/*/*/
**/bench.json
**/browser/browser.json
Expand All @@ -35,4 +36,4 @@ test/browser/html/
test/core/html/
.vitest-attachments
explainFiles.txt
.vitest-dump
.vitest-dump
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Vitest is a next-generation testing framework powered by Vite. This is a monorep

### Core Packages (`packages/`)
- `vitest` - Main testing framework
- `vite-node` - Vite SSR runtime
- `browser` - Browser testing support
- `ui` - Web UI for test results
- `runner` - Test runner core
Expand Down Expand Up @@ -82,6 +81,7 @@ Vitest is a next-generation testing framework powered by Vite. This is a monorep
- ESM-first approach
- Follow existing patterns in the codebase
- Use utilities from `@vitest/utils/*` when available. Never import from `@vitest/utils` main entry point directly.
- Do not add comments explaining what the line does unless prompted to.

## Common Workflows

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ To develop and test `vitest` package:

### VS Code

If you want to use break point and explore code execution you can use the ["Run and debug"](https://code.visualstudio.com/docs/editor/debugging) feature from vscode.
If you want to use break point and explore code execution you can use the ["Run and debug"](https://code.visualstudio.com/docs/debugtest/debugging) feature from vscode.

1. Add a `debugger` statement where you want to stop the code execution.

Expand All @@ -39,11 +39,11 @@ If you want to use break point and explore code execution you can use the ["Run

4. It will open a terminal, then type the test command: `pnpm run test`

5. The execution will stop and you'll use the [Debug toolbar](https://code.visualstudio.com/docs/editor/debugging#_debug-actions) to continue, step over, restart the process...
5. The execution will stop and you'll use the [Debug toolbar](https://code.visualstudio.com/docs/debugtest/debugging#_debug-actions) to continue, step over, restart the process...

## Testing Vitest against external packages

You may wish to test your locally-modified copy of Vitest against another package that is using it. For pnpm, after building Vitest, you can use [`pnpm.overrides`](https://pnpm.io/package_json#pnpmoverrides). Please note that `pnpm.overrides` must be specified in the root `package.json` and you must first list the package as a dependency in the root `package.json`:
You may wish to test your locally-modified copy of Vitest against another package that is using it. For pnpm, after building Vitest, you can use [`pnpm.overrides`](https://pnpm.io/9.x/package_json#pnpmoverrides). Please note that `pnpm.overrides` must be specified in the root `package.json` and you must first list the package as a dependency in the root `package.json`:

```json
{
Expand Down Expand Up @@ -149,7 +149,7 @@ Avoid deps that has large transitive dependencies that results in bloated size c

If there are libraries that are needed and don't comply with our size
requirements, a fork can be tried to reduce its size while we work with them to
upstream our changes (see [tinypool](https://github.com/tinylibs/tinypool) for example)
upstream our changes.

### Think before adding yet another option

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Next generation testing framework powered by Vite.
- [JSDOM](https://github.com/jsdom/jsdom) and [happy-dom](https://github.com/capricorn86/happy-dom) for DOM and browser API mocking
- [Browser Mode](https://vitest.dev/guide/browser/) for running component tests in the browser
- Components testing ([Vue](https://github.com/vitest-tests/browser-examples/tree/main/examples/vue), [React](https://github.com/vitest-tests/browser-examples/tree/main/examples/react), [Svelte](https://github.com/vitest-tests/browser-examples/tree/main/examples/svelte), [Lit](./examples/lit), [Marko](https://github.com/marko-js/examples/tree/master/examples/library-ts))
- Workers multi-threading via [Tinypool](https://github.com/tinylibs/tinypool) (a lightweight fork of [Piscina](https://github.com/piscinajs/piscina))
- Benchmarking support with [Tinybench](https://github.com/tinylibs/tinybench)
- [Projects](https://vitest.dev/guide/projects) support
- [expect-type](https://github.com/mmkal/expect-type) for type-level testing
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ declare module 'vue' {
Box: typeof import('./components/Box.vue')['default']
Contributors: typeof import('./components/Contributors.vue')['default']
CourseLink: typeof import('./components/CourseLink.vue')['default']
Deprecated: typeof import('./components/Deprecated.vue')['default']
FeaturesList: typeof import('./components/FeaturesList.vue')['default']
HomePage: typeof import('./components/HomePage.vue')['default']
ListItem: typeof import('./components/ListItem.vue')['default']
Expand Down
9 changes: 9 additions & 0 deletions docs/.vitepress/components/Deprecated.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script setup lang="ts">
import { VPBadge } from 'vitepress/theme'
</script>

<template>
<VPBadge type="danger">
deprecated
</VPBadge>
</template>
1 change: 0 additions & 1 deletion docs/.vitepress/components/FeaturesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<ListItem>Component testing for Vue, React, Svelte, Lit, Marko and more</ListItem>
<ListItem>Out-of-the-box TypeScript / JSX support</ListItem>
<ListItem>ESM first, top level await</ListItem>
<ListItem>Workers multi-threading via <a target="_blank" href="https://github.com/tinylibs/tinypool" rel="noopener noreferrer">Tinypool</a></ListItem>
<ListItem>Benchmarking support with <a target="_blank" href="https://github.com/tinylibs/tinybench" rel="noopener noreferrer">Tinybench</a></ListItem>
<ListItem>Filtering, timeouts, concurrent for suite and tests</ListItem>
<ListItem><a href="/guide/projects">Projects</a> support</ListItem>
Expand Down
16 changes: 12 additions & 4 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default ({ mode }: { mode: string }) => {
['link', { rel: 'icon', href: '/favicon.ico', sizes: '48x48' }],
['link', { rel: 'icon', href: '/logo.svg', sizes: 'any', type: 'image/svg+xml' }],
['meta', { name: 'author', content: `${teamMembers.map(c => c.name).join(', ')} and ${vitestName} contributors` }],
['meta', { name: 'keywords', content: 'vitest, vite, test, coverage, snapshot, react, vue, preact, svelte, solid, lit, marko, ruby, cypress, puppeteer, jsdom, happy-dom, test-runner, jest, typescript, esm, tinypool, tinyspy, node' }],
['meta', { name: 'keywords', content: 'vitest, vite, test, coverage, snapshot, react, vue, preact, svelte, solid, lit, marko, ruby, cypress, puppeteer, jsdom, happy-dom, test-runner, jest, typescript, esm, tinyspy, node' }],
['meta', { property: 'og:title', content: vitestName }],
['meta', { property: 'og:description', content: vitestDescription }],
['meta', { property: 'og:url', content: ogUrl }],
Expand Down Expand Up @@ -210,6 +210,10 @@ export default ({ mode }: { mode: string }) => {
text: 'v2.x',
link: 'https://v2.vitest.dev/',
},
{
text: 'v3.x',
link: 'https://v3.vitest.dev/',
},
],
},
],
Expand Down Expand Up @@ -311,9 +315,9 @@ export default ({ mode }: { mode: string }) => {
docFooterText: 'Visual Regression Testing | Browser Mode',
},
{
text: 'Trace Viewer',
link: '/guide/browser/trace-viewer',
docFooterText: 'Trace Viewer | Browser Mode',
text: 'Trace View',
link: '/guide/browser/trace-view',
docFooterText: 'Trace View | Browser Mode',
},
],
},
Expand Down Expand Up @@ -628,6 +632,10 @@ function guide(): DefaultTheme.SidebarItem[] {
},
],
},
{
text: 'Recipes',
link: '/guide/recipes',
},
]
}

Expand Down
2 changes: 2 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
import { h } from 'vue'
import HomePage from '../components/HomePage.vue'
import Version from '../components/Version.vue'
import Deprecated from '../components/Deprecated.vue'
import '../style/main.css'
import '../style/vars.css'
import 'uno.css'
Expand All @@ -25,6 +26,7 @@ export default {
},
enhanceApp({ app }) {
app.component('Version', Version)
app.component('Deprecated', Deprecated)
app.use(TwoslashFloatingVue)
enhanceAppWithTabs(app)
},
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/api/vitest.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ This methods overrides the global [test name pattern](/config/#testnamepattern).
This method doesn't start running any tests. To run tests with updated pattern, call [`runTestSpecifications`](#runtestspecifications).
:::

## getGlobalTestNamePattern
## getGlobalTestNamePattern <Version>4.0.0</Version> {#getglobaltestnamepattern}

```ts
function getGlobalTestNamePattern(): RegExp | undefined
Expand Down
Loading