# Vitest v2.0.0 — Release & Upgrade Intelligence
- **Product:** Vitest (https://vitest.dev)
- **Version:** v2.0.0
- **Released:** Jul 08, 2024
- **Impact Score:** 7/10
- **Breaking Changes:** Source flagged
- **Canonical Analysis:** https://changelogs.us/vitest/updates/v2.0.0/

## Executive Summary (TL;DR)
Vitest v2.0.0. Source highlight: 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.

## Breaking Changes & Deprecations
- 🚨 Breaking Changes - Simplify mock function generic types and align with jest - by **@hi-ogawa** in https://github.com/vitest-dev/vitest/pull/4784 [<samp>(a0c1d37)</samp>](https://github.com/vitest-dev/vitest/commit/a0c1d371edb35abfa0e6f53b05086a54d2ecc0a6)

## New Features
- This flag was introduced to combat `threads` segfaults. Our current recommendation is to use the new default `forks` pool instead.
- Add correct location and snapshot fields in json reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5434 <samp>(bcccc)</samp>
- Add promise-based return assertions, do not auto-resolve returned promises - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5749 <samp>(5f710)</samp>
- ⚠️ Vitest no longer unwraps promises in `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.
- Add meta to `json` output - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5802 <samp>(dd754)</samp>
- Add "vitest list" API to print collected tests without running them - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6013 <samp>(583dd)</samp>

## Improvements
- This pool may be slightly slower than previous `threads` pool: https://vitest.dev/guide/improving-performance.html#pool

## Bug Fixes
- Print console statements in vmThreads - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5678 <samp>(34a80)</samp>
- Repeatable `--exclude` option - by @fregante in https://github.com/vitest-dev/vitest/issues/5782 <samp>(d6700)</samp>
- Remove browser.fileParallelism - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5790 <samp>(b881e)</samp>
- Install UI icons - by @sheremet-va <samp>(b84f1)</samp>
- Vi.waitFor/vi.waitUntil interval is now cleared after it times out - by @pedro00dk in https://github.com/vitest-dev/vitest/issues/5875 <samp>(04107)</samp>
- ToJSON recursive error serialization - by @eddienubes in https://github.com/vitest-dev/vitest/issues/5848 and https://github.com/vitest-dev/vitest/issues/5884 <samp>(8d55d)</samp>
