[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

feat: stabilize experimental features (#9529)

authored by

Vladimir and committed by
GitHub
(Jan 26, 2026, 3:05 PM +0100) b5fd2a16 5a7275f6

+13 -23
+1 -1
docs/guide/environment.md
··· 49 49 export default <Environment>{ 50 50 name: 'custom', 51 51 viteEnvironment: 'ssr', 52 - // optional - only if you support "experimental-vm" pool 52 + // optional - only if you support "vmForks" or "vmThreads" pools 53 53 async setupVM() { 54 54 const vm = await import('node:vm') 55 55 const context = vm.createContext()
+1 -1
docs/guide/snapshot.md
··· 98 98 99 99 ## Visual Snapshots 100 100 101 - For visual regression testing of UI components and pages, Vitest provides built-in support through [browser mode](/guide/browser/) with the [`toMatchScreenshot()`](/api/browser/assertions#tomatchscreenshot-experimental) assertion: 101 + For visual regression testing of UI components and pages, Vitest provides built-in support through [browser mode](/guide/browser/) with the [`toMatchScreenshot()`](/api/browser/assertions#tomatchscreenshot) assertion: 102 102 103 103 ```ts 104 104 import { expect, test } from 'vitest'
-1
packages/browser/context.d.ts
··· 866 866 /** 867 867 * Configures default options of `prettyDOM` and `debug` functions. 868 868 * This will also affect `vitest-browser-{framework}` package. 869 - * @experimental 870 869 */ 871 870 configurePrettyDOM(options: StringifyOptions): void 872 871 /**
+4 -4
docs/api/advanced/reporters.md
··· 15 15 - [`onHookStart(beforeAll)`](#onhookstart) 16 16 - [`onHookEnd(beforeAll)`](#onhookend) 17 17 - [`onTestCaseReady`](#ontestcaseready) 18 - - [`onTestAnnotate`](#ontestannotate) <Version>3.2.0</Version> 18 + - [`onTestCaseAnnotate`](#ontestcaseannotate) <Version>3.2.0</Version> 19 19 - [`onTestCaseArtifactRecord`](#ontestcaseartifactrecord) <Version type="experimental">4.0.11</Version> 20 20 - [`onHookStart(beforeEach)`](#onhookstart) 21 21 - [`onHookEnd(beforeEach)`](#onhookend) ··· 313 313 314 314 At this point, [`testCase.result()`](/api/advanced/test-case#result) will have non-pending state. 315 315 316 - ## onTestAnnotate <Version>3.2.0</Version> {#ontestannotate} 316 + ## onTestCaseAnnotate <Version>3.2.0</Version> {#ontestcaseannotate} 317 317 318 318 ```ts 319 - function onTestAnnotate( 319 + function onTestCaseAnnotate( 320 320 testCase: TestCase, 321 321 annotation: TestAnnotation, 322 322 ): Awaitable<void> 323 323 ``` 324 324 325 - The `onTestAnnotate` hook is associated with the [`context.annotate`](/guide/test-context#annotate) method. When `annotate` is invoked, Vitest serialises it and sends the same attachment to the main thread where reporter can interact with it. 325 + The `onTestCaseAnnotate` hook is associated with the [`context.annotate`](/guide/test-context#annotate) method. When `annotate` is invoked, Vitest serialises it and sends the same attachment to the main thread where reporter can interact with it. 326 326 327 327 If the path is specified, Vitest stores it in a separate directory (configured by [`attachmentsDir`](/config/#attachmentsdir)) and modifies the `path` property to reference it. 328 328
+5 -1
docs/api/advanced/test-module.md
··· 121 121 } 122 122 ``` 123 123 124 - ## viteEnvironment <Version type="experimental">4.0.15</Version> <Experimental /> {#viteenvironment} 124 + ## viteEnvironment <Version>4.1.0</Version> {#viteenvironment} 125 125 126 126 This is a Vite's [`DevEnvironment`](https://vite.dev/guide/api-environment) that transforms all files inside of the test module. 127 + 128 + ::: details History 129 + - `v4.0.15`: added as experimental 130 + ::: 127 131 128 132 ## toTestSpecification <Version>4.1.0</Version> {#totestspecification} 129 133
+1 -1
docs/api/advanced/test-specification.md
··· 40 40 41 41 Instance of [`TestModule`](/api/advanced/test-module) associated with the specification. If test wasn't queued yet, this will be `undefined`. 42 42 43 - ## pool <Badge type="warning">experimental</Badge> {#pool} 43 + ## pool {#pool} 44 44 45 45 The [`pool`](/config/#pool) in which the test module will run. 46 46
+1 -3
docs/api/advanced/vitest.md
··· 478 478 479 479 Register a handler that will be called when the test run is cancelled with [`vitest.cancelCurrentRun`](#cancelcurrentrun). 480 480 481 - ::: warning EXPERIMENTAL 482 - Since 4.0.10, `onCancel` returns a teardown function that will remove the listener. 483 - ::: 481 + Since 4.0.10, `onCancel` experimentally returns a teardown function that will remove the listener. Since 4.1.0 this behaviour is considered stable. 484 482 485 483 ## onClose 486 484
-1
docs/api/browser/context.md
··· 222 222 /** 223 223 * Configures default options of `prettyDOM` and `debug` functions. 224 224 * This will also affect `vitest-browser-{framework}` package. 225 - * @experimental 226 225 */ 227 226 configurePrettyDOM(options: StringifyOptions): void 228 227 /**
-4
docs/guide/advanced/tests.md
··· 27 27 } 28 28 ``` 29 29 30 - ::: tip 31 - [`TestModule`](/api/advanced/test-module), [`TestSuite`](/api/advanced/test-suite) and [`TestCase`](/api/advanced/test-case) APIs are not experimental and follow SemVer since Vitest 2.1. 32 - ::: 33 - 34 30 ## `createVitest` 35 31 36 32 Creates a [Vitest](/api/advanced/vitest) instances without running tests.
-1
packages/mocker/src/node/hoistMocks.ts
··· 35 35 * @default ["hoisted"] 36 36 */ 37 37 hoistedMethodNames?: string[] 38 - // @experimental, TODO 39 38 globalThisAccessor?: string 40 39 regexpHoistable?: RegExp 41 40 codeFrameGenerator?: CodeFrameGenerator
-1
packages/vitest/src/node/test-specification.ts
··· 27 27 public readonly moduleId: string 28 28 /** 29 29 * The current test pool. It's possible to have multiple pools in a single test project with `typecheck.enabled`. 30 - * @experimental In later versions, the project will only support a single pool. 31 30 */ 32 31 public readonly pool: Pool 33 32 /**
-3
packages/browser/src/client/tester/context.ts
··· 492 492 return error 493 493 } 494 494 495 - /** 496 - * @experimental 497 - */ 498 495 function configurePrettyDOM(options: StringifyOptions) { 499 496 defaultOptions = options 500 497 }
-1
packages/vitest/src/node/types/reporter.ts
··· 13 13 /** 14 14 * Called when the project initiated the browser instance. 15 15 * project.browser will always be defined. 16 - * @experimental 17 16 */ 18 17 onBrowserInit?: (project: TestProject) => Awaitable<void> 19 18 /** @internal */