NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3828 most downloaded on npm
Browser running for Vitest
Last release 4 days ago
30 Sep 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
239 releases · first in 2022
One column per quarter.
*No significant changes* ##### View changes on GitHub
No significant changes
Move page.config to server.config, add more docs - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6252 (af2b8)
index file - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6266 <samp>(081cf)</samp>Introduce experimental reported tasks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6149 (13d85)
testNamePattern adds leading space - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6186 <samp>(073a5)</samp>afterEach cleanup hooks in node entrypoint - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6192 <samp>(e6fbc)</samp>defineProject and defineWorkspace types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6198 <samp>(8cd82)</samp>node:* imports in __mocks__ folder - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6204 <samp>(a48be)</samp>One-line environment options - by @hahanein in https://github.com/vitest-dev/vitest/issues/5105 (38269)
require - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6159 <samp>(807a2)</samp>*.cts files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6189 <samp>(5da45)</samp>thresholds.<glob>.100 option - by @thor-juhasz and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6174 <samp>(f6845)</samp>mockImplementation for function overload and unions - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6181 <samp>(7a75b)</samp>ui: Show all suites/tests when parent matches - by @userquin in https://github.com/vitest-dev/vitest/issues/6106 (840e0)
--inspect-brk stop on Windows - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6110 <samp>(f8519)</samp>vi.spyOn to MockInstance of function overload - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6086 <samp>(e9f9a)</samp>Remove @vitest/runner > pretty-format from prebundling because it doesn't exist - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6075
crypto.randomUUID from the client - by @userquin in https://github.com/vitest-dev/vitest/issues/6079 <samp>(04c83)</samp>vitest - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6060 <samp>(95a2d)</samp>browser: Correctly inherit browser config in a workspace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6054 (4b03e)
Update vulnerable test-exclude to v7 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5867 (0a715)
Vitest 2.0 is here! This release page lists all changes made to the project during the beta. For the migration guide, please refer to the documentation.
--segfault-retry - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5514 <samp>(ed60e)</samp>
threads segfaults. Our current recommendation is to use the new default forks pool instead.onTestFinished hook. This can make your tests run a little bit slower.coverage.ignoreEmptyLines by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5543 <samp>(31994)</samp>
location field pointed to the error location instead of the test location. Now it is aligned with jest and contains the line and column of a test function, but requires includeTaskLocation to be enabled.pool to 'forks' - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5047 <samp>(7f8f9)</samp>
threads pool: https://vitest.dev/guide/improving-performance.html#pool--merge-reports to support coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5736 <samp>(b7438)</samp>spy.mock.returns. If the function is async or returns a promise, it will always succeed and have a Promise in results. To make migration easier, we introduced spy.mock.settledResults that unwraps promises and expect().toHaveResolved() matcher that accepts unwrapped value.json output - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5802 <samp>(dd754)</samp>indexScripts to orchestratorScripts in the browser config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5842 <samp>(49f34)</samp>pool API - now requires collectTests method alongside runTests.exclude in coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5997 <samp>(169bc)</samp>
exclude patterns if coverage.exclude was overridden in the config. Add your test patterns manually, or merge your overrides with default ones: ['**/my-pattern.js', ...coverageConfigDefaults.exclude]. See https://vitest.dev/config/#coverage-exclude for an example.process.exit if workspace project failed to be created - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5804 <samp>(a820e)</samp>process.exit manually - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5926 <samp>(e9b63)</samp><img width="1392" alt="Running tresjs example in Vitest BrowserMode" src="https://github.com/vitest-dev/vitest/assets/16173870/3b6bc721-b194-416d-a685-cf7282ee802a">
click event - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5777 <samp>(839c3)</samp>page.screenshot method - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5853 <samp>(81c42)</samp>userEvent methods, add fill and dragAndDrop events - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5882 <samp>(4dbea)</samp>expect.dom method and bundle jest-dom matchers with @vitest/browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5910 <samp>(3a96a)</samp>tripleClick to interactive api - by @userquin in https://github.com/vitest-dev/vitest/issues/5987 <samp>(200a4)</samp>--reporter=blob flag to generate reports and combine them with vitest --merge-reports later!--output-json - by @Joristdh in https://github.com/vitest-dev/vitest/issues/5745 <samp>(0766b)</samp>parseAst, parseAstAsync from vite - by @sheremet-va <samp>(f645e)</samp>test.for - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5861 <samp>(c2380)</samp>--exclude option - by @fregante in https://github.com/vitest-dev/vitest/issues/5782 <samp>(d6700)</samp>project.provide type - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5959 <samp>(0eda9)</samp>preview provider when running in StackBlitz - by @userquin in https://github.com/vitest-dev/vitest/issues/5836 <samp>(76e13)</samp>coverage.reporter from string values - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5920 <samp>(f33da)</samp>thresholds.autoUpdate to support mergeConfig - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5818 <samp>(7afb3)</samp>stderr of startVitest() - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5954 <samp>(70805)</samp>else - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6014 <samp>(368c1)</samp>test-exclude to v7 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5867 <samp>(0a715)</samp>poolOptions.<name>.isolate from forks options - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5840 <samp>(a60a1)</samp>toMatchFileSnapshot with empty file - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5894 <samp>(88006)</samp>FileDetails title status icon not being updated - by @userquin in https://github.com/vitest-dev/vitest/issues/5942 <samp>(e9ddf)</samp>VITE_ - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6017 <samp>(d87be)</samp>provide to the public API - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5897 <samp>(66e64)</samp>vitest: Add "vitest list" API to print collected tests without running them - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6013 (583
parseAst, parseAstAsync from vite - by @sheremet-va <samp>(f645e)</samp>tripleClick to interactive api - by @userquin in https://github.com/vitest-dev/vitest/issues/5987 <samp>(200a4)</samp>exclude - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5997 <samp>(169bc)</samp>else - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6014 <samp>(368c1)</samp>VITE_ - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6017 <samp>(d87be)</samp>Introduce expect.dom method and bundle jest-dom matchers with @vitest/browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5910 (3
expect.dom method and bundle jest-dom matchers with @vitest/browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5910 <samp>(3a96a)</samp>project.provide type - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5959 <samp>(0eda9)</samp>stderr of startVitest() - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5954 <samp>(70805)</samp>FileDetails title status icon not being updated - by @userquin in https://github.com/vitest-dev/vitest/issues/5942 <samp>(e9ddf)</samp>Image type add bmp - by @btea in https://github.com/vitest-dev/vitest/issues/5921 (98f9b)
userEvent methods, add fill and dragAndDrop events - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5882 <samp>(4dbea)</samp>coverage.reporter from string values - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5920 <samp>(f33da)</samp>toMatchFileSnapshot with empty file - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5894 <samp>(88006)</samp>provide to the public API - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5897 <samp>(66e64)</samp>Update vulnerable test-exclude to v7 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5867 (0a715)
page.screenshot method - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5853 <samp>(81c42)</samp>test.for - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5861 <samp>(c2380)</samp>test-exclude to v7 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5867 <samp>(0a715)</samp>poolOptions.<name>.isolate from forks options - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5840 <samp>(a60a1)</samp>browser: Don't optimize Vitest dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5843 (f15b4)
Rename indexScripts to orchestratorScripts - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5842 (49f34)
preview provider when running in StackBlitz - by @userquin in https://github.com/vitest-dev/vitest/issues/5836 <samp>(76e13)</samp>Add meta to json output - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5802 (dd754)
click event - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5777 <samp>(839c3)</samp>thresholds.autoUpdate to support mergeConfig - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5818 <samp>(7afb3)</samp>Restore the original viewport when unselecting the preset viewport - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5821 (5ebb3)
--merge-reports to support coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5736 (b7438)
--merge-reports to support coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5736 <samp>(b7438)</samp>--output-json - by @Joristdh in https://github.com/vitest-dev/vitest/issues/5745 <samp>(0766b)</samp>--exclude option - by @fregante in https://github.com/vitest-dev/vitest/issues/5782 <samp>(d6700)</samp>Remove deprecated options - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5696 (5c308)
Change default pool to 'forks' - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5047 (7f8f9)
pool to 'forks' - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5047 <samp>(7f8f9)</samp>Remove the empty suite from the runner - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5435 (dbbbe)
coverage.ignoreEmptyLines by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5543 <samp>(31994)</samp>Remote Code Execution when accessing a malicious website while Vitest API server is listening | CVE-2025-24964
This release includes security patches for:
Support standalone mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5565 (bdce0)
includeConsoleOutput and addFileAttribute in junit - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5659 <samp>(2f913)</samp>resolveId('vitest') after buildStart - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5646 <samp>(f5faf)</samp>toJSON for error serialization - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5526 <samp>(19a21)</samp>*.test-d.* by default - by @MindfulPol in https://github.com/vitest-dev/vitest/issues/5634 <samp>(bfe8a)</samp>vite-node's wrapper only to executed files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5642 <samp>(c9883)</samp>Use package.json name for a workspace project if not provided - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5608 (48fba)
Check for null before storing in weakmap - by @sheremet-va (ce368)
api: startVitest() to accept stdout and stdin - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5493 (780b1)
startVitest() to accept stdout and stdin - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5493 <samp>(780b1)</samp>
startVitest API is experimental and doesn't follow semver.import.meta.env.PROD: false - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5561 <samp>(9c649)</samp>onTestFinished in reverse order - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5598 <samp>(23f29)</samp>fileParallelism by default on browser pool - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5528 <samp>(5c69f)</samp>v8-to-istanbul - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5549 <samp>(df6a4)</samp>cleanOnRerun is disabled - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5540 <samp>(ea3c1)</samp>thresholds to compare files relative to root - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5574 <samp>(80265)</samp>toEqual and toMatchObject with circular references - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5535 <samp>(9e641)</samp>Add configuration for diff truncation - by @willieho in https://github.com/vitest-dev/vitest/issues/5073 and https://github.com/vitest-dev/vitest/issu
describe calls not taking generic type parameters - by @aryaemami59 in https://github.com/vitest-dev/vitest/issues/5415 <samp>(16bac)</samp>process is mocked - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5430 <samp>(0ec4d)</samp>toHaveBeenNthCalledWith error message when not called - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5420 <samp>(e5253)</samp>isValidNodeImport to check "type": "module" first - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5416 <samp>(6fb15)</samp>Deprecate cache.dir option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5229 (d7e8b)
not - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5294 <samp>(b9d37)</samp>--project option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5295 <samp>(201bd)</samp>shuffle.files and shuffle.tests options - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5281 <samp>(356db)</samp>cache.dir option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5229 <samp>(d7e8b)</samp>--changed option - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5314 <samp>(600b4)</samp>clearScreen cli flag - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5241 <samp>(e1735)</samp>--project option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5265 <samp>(d1a06)</samp>--inspect-brk to pause before execution - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5355 <samp>(e77c5)</samp>magic-string to optimizeDeps.include - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5278 <samp>(8f04e)</samp>reportsDirectory from removing user's project - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5376 <samp>(07ec3)</samp>toContain/toMatch assertion error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5267 <samp>(8ee59)</samp>defines to support undefined values - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5284 <samp>(5b58b)</samp>onConsoleLog return type - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5337 <samp>(6d1b1)</samp>beforeAll and afterAll - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5288 <samp>(ce5ca)</samp>@vitest/coverage-v8 are used - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5250 <samp>(29f98)</samp>vitest: Expose parseCLI method - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5248 (c793a)
Deprecate watchExclude - by @patak-dev in https://github.com/vitest-dev/vitest/issues/5171 (82885)
snapshotSerializers option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5092 <samp>(5b102)</samp>poolOptions - by @penalosa in https://github.com/vitest-dev/vitest/issues/5221 <samp>(bc5b2)</samp>coverage.reportsDirectory with multiple directories - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5056 <samp>(ae73f)</samp>--browser=<name> correctly - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5179 <samp>(656e2)</samp>.tmp directory conflicts with --shard option - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5184 <samp>(5749d)</samp>defineWorkspace - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5089 <samp>(0bf52)</samp>jsdom variable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5164 <samp>(0f898)</samp>optimizeDeps.disabled warnings on Vite 5.1 - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5215 <samp>(1aecd)</samp>disableConsoleIntercept config - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5074 <samp>(a55ad)</samp>Remove coverage/.tmp files after run - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5008 (d53b8)
coverage/.tmp files after run - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5008 <samp>(d53b8)</samp>toThrow(asymmetricMatcher) failure message - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5000 <samp>(a199a)</samp>VITEST_POOL_ID - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5002 <samp>(7d0a4)</samp>ignoreSourceErrors in run mode - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5044 <samp>(6dae3)</samp>useFakeTimers to fake requestIdleCallback on non browser - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5028 <samp>(a9a48)</samp>import.meta.resolve - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5045 <samp>(cf564)</samp>Apply inlined workspace config to browser mode vite server - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4947 (db01f)
thresholds.autoUpdate to work with arrow function configuration files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4959 <samp>(4b411)</samp>AsymmetricMatcher - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4942 <samp>(06bae)</samp>await vi.hoisted - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4962 <samp>(dcf2e)</samp>Support case-insensitive path matching in cli - by @tigranmk in https://github.com/vitest-dev/vitest/issues/3567 and https://github.com/vitest-dev/vit
--disable-console-intercept option to allow opting-out from automatic console log interception - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4786 <samp>(43fa6)</samp>server.headers - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4890 <samp>(55f53)</samp>testNamePattern config - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4909 <samp>(4add9)</samp>objDisplay default truncate option for test.each title - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4917 <samp>(9ae9d)</samp>process.exit is called inside the test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4903 <samp>(8e6c1)</samp>pool and poolOptions on project level - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4765 <samp>(e9fe4)</samp>Vi.mock breaks tests when using imported variables inside the factory - by @sheremet-va and Dunqing in https://github.com/vitest-dev/vitest/issues/487
slowTestThreshold to all reporters - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4876 <samp>(1769c)</samp>Remove internal flag from UI option in the config - by @sheremet-va (7b4a2)
expect(...).toMatchFileSnapshot() matcher. - by @zmullett, Zac Mullett and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4839 <samp>(b8140)</samp>Promise in mockImplementation if it's not in the function signature - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4859 <samp>(072e0)</samp>vi.mock is called - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4862 <samp>(e12a5)</samp>memoryLimit - by @inottn and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4802 <samp>(70e8a)</samp>Don't crash when using happy-dom or jsdom environment on Yarn PnP workspaces - by @wojtekmaj and @sheremet-va in https://github.com/vitest-dev/vitest/
inline: true is set - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4815 <samp>(8f622)</samp>--no-parallelism - by @bonyuta0204 in https://github.com/vitest-dev/vitest/issues/4831 <samp>(5053a)</samp>skip - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4814 <samp>(19faf)</samp>beforeAll/afterAll errors in junit reporter - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4819 <samp>(2baea)</samp>Add es-main compatibility to vite-node - by @zookatron in https://github.com/vitest-dev/vitest/issues/4751 (486a3)
--workspace option, fix root resolution in workspaces - by @sheremet-va and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4773 <samp>(67d93)</samp>--no-file-parallelism, --maxWorkers, --minWorkers flags - by @sheremet-va and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4705 <samp>(fd5d7)</samp>--no-isolate flag to improve performance, add documentation about performance - by @sheremet-va, @AriPerkkio and Pascal Jufer in https://github.com/vitest-dev/vitest/issues/4777 <samp>(4d55a)</samp>--exclude CLI flag - by @Namchee and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4279 <samp>(f859e)</samp>toHaveProperty assertion error diff - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4734 <samp>(f8f70)</samp>defineWorkspace fix intellisense and report type errors - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4743 <samp>(9cc36)</samp>The previous release was built incorrectly and didn't include the performance fix. This release fixes that.
The previous release was built incorrectly and didn't include the performance fix. This release fixes that.
--coverage.all=false resolved incorrectly - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4697 <samp>(a7931)</samp>log-update to v5 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4711 <samp>(13ff9)</samp>Correct package exports - by @userquin in https://github.com/vitest-dev/vitest/issues/4707 (37388)
log-update to v5 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4711 <samp>(13ff9)</samp>Don't check if vite is installed - by @wojtekmaj in https://github.com/vitest-dev/vitest/issues/4659 (775e2)
stripSnapshotIndentation for thrown snapshot - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4663 <samp>(74820)</samp>URL equality check only when URL is available - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4670 <samp>(43783)</samp>Bump vitest packages peerDependencies versions - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4654 (42070)
peerDependencies versions - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4654 <samp>(42070)</samp>Remove deprecated node loader - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4371 (29299)
Vitest 1.0 is here! This release page lists all changes made to the project during the beta. For the migration guide, please refer to the documentation.
pool and poolOptions, remove old flags - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4172 <samp>(114a9)</samp>child_process - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3925 <samp>(8b4a4)</samp>vitest peer dependency range for sub packages - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4299 <samp>(cd03c)</samp>expect().toContain() can handle classList, Node.contains, and any array-like structure. This means you cannot use it to check if one object is a subset of another - use expect().toMatchObject() in that case - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4239 <samp>(ce84f)</samp>transformMode and workspace project based source maps - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4309 <samp>(28109cc)</samp>coverage.all by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4265 <samp>(5a741)</samp>/* v8 ignore... ignore hints - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4573 <samp>(f9e4a)</samp>expect.closeTo api - by @Dunqing and golebiowskib in https://github.com/vitest-dev/vitest/issues/4260 <samp>(7f91c)</samp>nextTick mocking error message to mention correct config option - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4215 <samp>(98fe3)</samp>expect - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4405 <samp>(9fe38)</samp>Error instance for thrown snapshot - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4396 <samp>(ac309)</samp>retry and bail from test config file - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4530 <samp>(94f9a)</samp>pretty-format as a sibling dependency - by @nicojs in https://github.com/vitest-dev/vitest/issues/4590 <samp>(ed50a)</samp>stdin when in run mode - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4310 <samp>(fc51a)</samp>pool and poolMatchGlobs in defineConfig - by @InfiniteXyy in https://github.com/vitest-dev/vitest/issues/4282 <samp>(9112c)</samp>thresholdAutoUpdate to detect zero limits - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4287 <samp>(a29fe)</samp>Object.freeze breaks toEqual - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4303 <samp>(a4501)</samp>error option from TaskResult - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4313 <samp>(4cee6)</samp>vi.hoisted if assigned - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4285 <samp>(ff93a)</samp>log-update v9 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4390 <samp>(ba1df)</samp>all: true instruments already instrumented files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4552 <samp>(d1e1b)</samp>Add --project option to limit what projects are running - by @sheremet-va, Anjorin Damilare and @AriPerkkio in https://github.com/vitest-dev/vitest/is
/* v8 ignore... ignore hints - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4573 <samp>(f9e4a)</samp>pretty-format as a sibling dependency - by @nicojs in https://github.com/vitest-dev/vitest/issues/4590 <samp>(ed50a)</samp>all: true instruments already instrumented files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4552 <samp>(d1e1b)</samp>See https://github.com/vitest-dev/vitest/pull/4442 for detailed list of breaking changes
coverage.thresholds. See https://github.com/vitest-dev/vitest/pull/4442 for detailed list of breaking changesretry and bail from test config file - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4530 <samp>(94f9a)</samp>Remove EnhancedSpy type, deprecate SpyInstance, improve mocks and vi documentation - by @sheremet-va and @dammy001 in https://github.com/vitest-dev/vi…
expect - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4405 <samp>(9fe38)</samp>Error instance for thrown snapshot - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4396 <samp>(ac309)</samp>log-update v9 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4390 <samp>(ba1df)</samp>Remove deprecated node loader - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4371 (29299)
vitest peer dependency range for sub packages - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4299 <samp>(cd03c)</samp>transformMode and workspace project based source maps - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4309 <samp>(28109cc)</samp>vitest typecheck is removed, use --typecheck) - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4324 <samp>(a1aad)</samp>stdin when in run mode - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4310 <samp>(fc51a)</samp>pool and poolMatchGlobs in defineConfig - by @InfiniteXyy in https://github.com/vitest-dev/vitest/issues/4282 <samp>(9112c)</samp>thresholdAutoUpdate to detect zero limits - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4287 <samp>(a29fe)</samp>Object.freeze breaks toEqual - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4303 <samp>(a4501)</samp>error option from TaskResult - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4313 <samp>(4cee6)</samp>Enable coverage.all by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4265 (5a741)
coverage.all by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4265 <samp>(5a741)</samp>expect.closeTo api - by @Dunqing and golebiowskib in https://github.com/vitest-dev/vitest/issues/4260 <samp>(7f91c)</samp>vi.hoisted if assigned to a variable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4285 <samp>(ff93a)</samp>Publish types file - by @sheremet-va (5996c)
This is a beta release for upcoming 1.0.0 version. Use beta dist-tag when installing Vitest: npm install --save-dev vitest@beta.
This is a beta release for upcoming 1.0.0 version. Use beta dist-tag when installing Vitest: npm install --save-dev vitest@beta.
child_process - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3925 <samp>(8b4a4)</samp>
canvas package, for example), this should improve your speed tremendously.useFakeTimers() no longer automatically mocks process.nextTick. Users can still mock it by explicitly specifying useFakeTimers({ toFake: ['nextTick'] })pool and poolOptions, remove old flags - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4172 <samp>(114a9)</samp>
--threads or other related flags.
--threads is now --pool=threads--no-threads is now --pool=forks--single-thread is now --poolOptions.threads.singleThread--experimental-vm-threads is now --pool=vmThreads--experimental-vm-worker-memory-limit is now --poolOptions.vmThreads.memoryLimit--isolate is now --poolOptions.<pool-name>.isolate and browser.isolatetest.maxThreads is now test.poolOptions.<pool-name>.maxThreadstest.minThreads is now test.poolOptions.<pool-name>.minThreadstest.useAtomics is now test.poolOptions.<pool-name>.useAtomicstest.poolMatchGlobs.child_process is now test.poolMatchGlobs.forkstest.poolMatchGlobs.experimentalVmThreads is now test.poolMatchGlobs.vmThreadscreateTaskCollector utility. This is primarily an advanced API for library authors.@vitest/snapshot separately, you will also need to update its usage. You no longer need to extend SnapshotClient to override equalityCheck method - just pass it down as an isEqual option. Also some of the public API methods were renamed for clarity.nextTick mocking error message to mention correct config option - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4215 <samp>(98fe3)</samp>test.extend should be init once time in all test - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4168 <samp>(a5979)</samp>Overwrite global URL with environment's - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4164 (cbe13)
test.extend should be init once time in all test - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4168 <samp>(730b2)</samp>Add diff option - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4063 (b50cf)
diff option - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4063 <samp>(b50cf)</samp>coverage['100'] to istanbul provider - by @marcelobotega in https://github.com/vitest-dev/vitest/issues/4109 <samp>(a7e09)</samp>vi.waitFor method - by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4113 <samp>(d79cb)</samp>vi.waitUntil method - by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4129 <samp>(e0ac9)</samp>toThrow - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3979 <samp>(725a0)</samp>testNamePattern - by @segrey in https://github.com/vitest-dev/vitest/issues/4103 and https://github.com/vitest-dev/vitest/issues/4104 <samp>(3c305)</samp>test.extend doesn't work in hooks without test - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4065 <samp>(175c7)</samp>SourceMapInput to fix CYCLIC_CROSS_CHUNK_REEXPORT - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4128 <samp>(ca70a)</samp>Resolving dep optimizer issues with workspace - by @thebanjomatic in https://github.com/vitest-dev/vitest/issues/4036 (0c13c)
coverage: Add allowExternal option - by @vojvodics and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3894 (c03fa)
allowExternal option - by @vojvodics and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3894 <samp>(c03fa)</samp>vitest/reporters - by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3980 <samp>(5704b)</samp>Allow importing CSS and assets inside external dependencies when using --experimental-vm-threads - by @sheremet-va in https://github.com/vitest-dev/vi
--experimental-vm-threads - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3880 <samp>(f4e6e)</samp>ctx.skip() inside the running test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3966 <samp>(5c88d)</samp>execute.d.ts - by @btea in https://github.com/vitest-dev/vitest/issues/3970 <samp>(0f8e6)</samp>?inline query is specified - by @thebanjomatic and Adam Hines in https://github.com/vitest-dev/vitest/issues/3952 <samp>(3891d)</samp>Pass --experimental-vm-worker-memory-limit to tinypool - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3856 (3c67a)
--experimental-vm-worker-memory-limit to tinypool - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3856 <samp>(3c67a)</samp>Update istanbul-lib-instrument to v6 to fix vulnerable dependency - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3814 (f3bd9)
transformMode is now moved to server.transformMode. This option is highly discouraged to use. If you need to change the transform mode, use the new option testTransformMode instead to control the mode based on the running test, not the current file path. By default, tests with jsdom or happy-dom use web transform mode, and tests using node or edge environment use ssr mode. If you have a custom environment, it should provide transformMode property.coverage.reportOnFailure by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3615 <samp>(0c6f6)</samp>@vitest/coverage-c8 package - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3614 <samp>(a90d6)</samp>
@vitest/coverage-c8 is no longer supported. Please, use @vitest/coverage-v8 instead.experimentalVmThreads pool to run your tests using VM Sandboxes environment. Make sure you understand all pitfalls of this pool before opening an issue.server option - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3725 <samp>(dc4fa)</samp>
deps. options are now moved to server.deps with a deprecation warning. Please, consider using deps.optimizer instead of deps.inline/deps.external. Ideally, we would like to move away from using server.deps.inline altogether.vite-node index.ts --watch, you now have to do vite-node --watch index.ts.deps.optimizer is now enabled by default. This means that Vitest will bundle specified dependencies before running your tests. This field inherits options from optimizeDeps and ssr.optimizeDeps which are populated by other plugins (like, Svelte).describe.sequential - by @fenghan34 and @dammy001 in https://github.com/vitest-dev/vitest/issues/3771 <samp>(86934)</samp>--related --watch reruns non-affected tests if they were changed during a run - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3844 <samp>(c9aea)</samp>defineConfig type from vite - by @sodatea in https://github.com/vitest-dev/vitest/issues/3804 <samp>(9c8e3)</samp>toStrictEqual - by @Dunqing <samp>(52aef)</samp>istanbul-lib-instrument to v6 to fix vulnerable dependency - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3814 <samp>(f3bd9)</samp>deps.optimizer.web instead. If you test Node.js applications, consider adding external packages to server.deps.inline.Revert default include patterns - by @so1ve #3729
0.32.0 changed the default include globs to be compatible with Jest. After a discussion with the community, we are reverting this change because it turned out to be non-intuitive.browser: Correctly optimize CJS dependencies - by @sheremet-va (3d090)
Add concurrent option to sequence config - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3604 (f427f)
concurrent option to sequence config - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3604 <samp>(f427f)</samp>bench name - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3711 <samp>(a749a)</samp>test.extend - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3554 <samp>(2db1a)</samp>CTRL+C to terminate run - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3642 <samp>(fa663)</samp>toBeCalledTimes - by @antfu in https://github.com/vitest-dev/vitest/issues/3696 <samp>(d3640)</samp>v8 to prevent crash on dynamic CJS files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3657 <samp>(40f18)</samp>retry and repeats 0 - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3638 <samp>(6d146)</samp>h key - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3618 <samp>(60c36)</samp>browser: Don't fail on importing diff-sequences - by @sheremet-va (00b0e)
Export registerConsoleShortcuts from vitest/node - by @deot in https://github.com/vitest-dev/vitest/issues/3563 (bc49b)
registerConsoleShortcuts from vitest/node - by @deot in https://github.com/vitest-dev/vitest/issues/3563 <samp>(bc49b)</samp>expect.unreachable - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3556 <samp>(8e385)</samp>describe/test name support anonymous function - by @btea in https://github.com/vitest-dev/vitest/issues/3562 <samp>(3d436)</samp>performance from perf_hooks - by @Max10240 and wangbaolong.wbl in https://github.com/vitest-dev/vitest/issues/3578 and https://github.com/vitest-dev/vitest/issues/3579 <samp>(24ec8)</samp>vitest - by @userquin in https://github.com/vitest-dev/vitest/issues/3580 <samp>(b4ac8)</samp>Your coding agent can read these notes before it upgrades. Set up the MCP server →