Skip to content

Releases: vitest-dev/vitest

v2.0.3

15 Jul 10:04
81b8d67
Compare
Choose a tag to compare

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v2.0.2

10 Jul 15:47
99a12ae
Compare
Choose a tag to compare

   🐞 Bug Fixes

   🏎 Performance

    View changes on GitHub

v2.0.1

08 Jul 15:33
16eb6c8
Compare
Choose a tag to compare

   🐞 Bug Fixes

    View changes on GitHub

v2.0.0

08 Jul 11:40
1b150a3
Compare
Choose a tag to compare

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

  • Simplify mock function generic types and align with jest - by @hi-ogawa in #4784 (a0c1d37)
  • Remove --segfault-retry - by @sheremet-va in #5514 (ed60e)
    • This flag was introduced to combat threads segfaults. Our current recommendation is to use the new default forks pool instead.
  • Run suite hooks in a stack - by @sheremet-va in #5609 (1277d)
    • This feels like a more sensible default. Especially with the new onTestFinished hook. This can make your tests run a little bit slower.
  • Enable coverage.ignoreEmptyLines by default - by @AriPerkkio in #5543 (31994)
    • ⚠️ This change may cause significant differences in your coverage results compared to Vitest v1. These changes are expected as coverage reporting is now more accurate. See #5423 for more details.
  • Add correct location and snapshot fields in json reporter - by @sheremet-va in #5434 (bcccc)
    • Previously, the 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.
  • Update dependency chai to v5 - by renovate[bot] and @sheremet-va in #5135 (73646)
  • Remove watchExclude - by @patak-dev in #5177 (d7371)
  • Change default pool to 'forks' - by @AriPerkkio in #5047 (7f8f9)
  • --merge-reports to support coverage - by @AriPerkkio in #5736 (b7438)
  • Add promise-based return assertions, do not auto-resolve returned promises - by @sheremet-va in #5749 (5f710)
    • ⚠️ 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.
  • Do not exit process if global setup has failed - by @sheremet-va in #5726 (ddb09)
  • Don't exit process if config failed - by @sheremet-va in #5715 (f232f)
  • Add meta to json output - by @sheremet-va in #5802 (dd754)
  • Rename indexScripts to orchestratorScripts in the browser config - by @sheremet-va in #5842 (49f34)
  • Add "vitest list" API to print collected tests without running them - by @sheremet-va in #6013 (583dd)
    • ⚠️ This changes the custom pool API - now requires collectTests method alongside runTests.
  • Remove the empty suite from the runner - by @sheremet-va in #5435 (dbbbe)
  • Support concurrent suites - by @hi-ogawa in #5491 (222ce44)
  • Support overriding exclude in coverage - by @AriPerkkio in #5997 (169bc)
    • ⚠️ Vitest coverage no longer adds test files to 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.

🚀 Features

Running tresjs example in Vitest BrowserMode
Read more

v2.0.0-beta.13

04 Jul 14:04
5611895
Compare
Choose a tag to compare
v2.0.0-beta.13 Pre-release
Pre-release

   🚨 Breaking Changes

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v2.0.0-beta.12

25 Jun 20:16
cd9cc6b
Compare
Choose a tag to compare
v2.0.0-beta.12 Pre-release
Pre-release

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v2.0.0-beta.11

19 Jun 20:14
3fd15ba
Compare
Choose a tag to compare
v2.0.0-beta.11 Pre-release
Pre-release

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v2.0.0-beta.10

12 Jun 12:12
2da5779
Compare
Choose a tag to compare
v2.0.0-beta.10 Pre-release
Pre-release

   🚀 Features

   🐞 Bug Fixes

    View changes on GitHub

v2.0.0-beta.9

05 Jun 08:01
5e43f89
Compare
Choose a tag to compare
v2.0.0-beta.9 Pre-release
Pre-release

   🐞 Bug Fixes

    View changes on GitHub

v2.0.0-beta.8

04 Jun 12:40
d5e51c4
Compare
Choose a tag to compare
v2.0.0-beta.8 Pre-release
Pre-release

   �� Breaking Changes

   🐞 Bug Fixes

    View changes on GitHub