Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
v3.0.0-beta.3
🚀 Features
- Support Vite v6 in mocker package - by @cexbrayat in #7058 (96f47)
- Allow multi-browser configuration - by @sheremet-va in #6975 (78b62)
- coverage:
thresholds
to support maximum uncovered items - by @jonahkagan in #7061 (bde98) - expect: Add
toBeOneOf
matcher - by @zirkelc and @hi-ogawa in #6974 (3d742) - runner: Add "queued" state - by @sheremet-va and @AriPerkkio in #6931 (5f8d2)
🐞 Bug Fixes
- Don't use dim color for passed tests - by @sheremet-va in #7059 (8a6f5)
- benchmark: Disable type testing while benchmarking - by @AriPerkkio in #7068 (4e603)
- deps: Update all non-major dependencies - in #7085 (8cc92)
View changes on GitHub
v3.0.0-beta.2
🚨 Breaking Changes
- expect: Check more properties for error equality - by @hi-ogawa and @sheremet-va in #5876 (10023)
- spy: SpyOn reuses mock if method is already spyed on - by @sheremet-va and @hi-ogawa in #6464 (b3e43)
🚀 Features
- Expose versions from
vitest/node
entry point and statically on Vitest - by @sheremet-va in #7029 (be8d4) diff.printBasicPrototype: false
by default - by @hi-ogawa in #7043 (2b5c5)- Prepare the Vitest API to be stable - by @sheremet-va in #6962 (9a1b5)
- cli: Support location filters for suites - by @mzhubail in #7048 (751e2)
- expect: Add
toSatisfy
asymmetric matcher - by @hi-ogawa in #7022 (f691a) - ui: Make clicking on a test in the UI open the report section and scroll to the test failure if applicable - by @jacoberdman2147 in #6900 (1bf27)
🐞 Bug Fixes
- Persist cli filters as watch mode file filter - by @hi-ogawa in #6955 (cc703)
- browser: Fix user event state on preview provider - by @hi-ogawa in #7041 (8e944)
- coverage: Correct coverage when
isolate: false
is used - by @AriPerkkio in #6957 (426ce) - runner: Long synchronous tasks does not time out - by @ferdodo and @sheremet-va in #2920 and #6944 (2fb58)
View changes on GitHub
v3.0.0-beta.1
We decided to skip Vitest 2.2 and release Vitest 3 with support for Vite 6 instead. There will be no more Vitest 2 versions. Vitest 3 is the first version that supports Vite 6 (excluding 2.1.6). We aim to have a stable release in January.
Vitest 3 is our first step to standardising the public Node.js API. We plan to remove the experimental tag from the current APIs in Vitest 3.1 - the API will follow semver after that.
🚨 Breaking Changes
spy.mockReset
changes - by @Lordfirespeed in #6426 (db7a8)- Pass down context to test hooks - by @sheremet-va in #7034 (82c2e)
- Support Vite 6 - by @sheremet-va in #7026 (7abe8)
- runner: Support
describe(..., { shuffle: boolean })
and inherit from parent suite - by @hi-ogawa in #6670 (aa1da) - snapshot: Reset snapshot state for
retry
andrepeats
- by @hi-ogawa in #6817 (e8ce9) - vitest: Don't expose default toFake config - by @sheremet-va in #6288 (e3144)
🚀 Features
- Support inline
diff
options and supportprintBasicPrototype
- by @hi-ogawa, @sheremet-va and Michał Grzegorzewski in #6740 (39186) - Allow a custom note when calling
ctx.skip()
dynamically - by @sheremet-va in #6805 (697c3) - Allow inline workspace configuration - by @sheremet-va in #6923 (562e1)
- Provide the current project to the global setup - by @sheremet-va in #6942 (a5bbc)
- Print project name as a label - by @sheremet-va in #6925 (a3bef)
- Print a deprecation warning if suite or test uses object as the third argument - by @sheremet-va in #7031 (407f1)
- browser:
- cli:
- expect:
- Add
toHaveBeenCalledExactlyOnceWith
expect matcher - by @jacoberdman2147 and @sheremet-va in #6894 (ff662) - Add
toHaveBeenCalledAfter
andtoHaveBeenCalledBefore
utility - by @Barbapapazes and @sheremet-va in #6056 (85e6f)
- Add
- reporter:
- Add support for function type to classname option in the junit reporter - by @jpleclerc, Jean-Philippe Leclerc and @hi-ogawa in #6839 (dc238)
- reporters:
summary
option forverbose
anddefault
reporters - by @AriPerkkio in #6893 (511b7)
- runner:
- Test context can inject values from the config's
provide
- by @sheremet-va in #6813 (85c64)
- Test context can inject values from the config's
- snapshot:
- ui:
- vitest:
- Include
coverageMap
in json report - by @sheremet-va in #6606 (9c8f7) - Add
onTestsRerun
method to global setup context - by @sheremet-va in #6803 (e26e0)
- Include
🐞 Bug Fixes
- Misc fix for vite 6 ecosystem ci - by @hi-ogawa in #6867 (80f8b)
- Respect
cacheDir
when optimizer is enabled - by @hi-ogawa in #6910 (0b08b) - Reset runningPromise after
finally
in case there is an error to avoid it getting stuck - by @sheremet-va in #6951 (02194) - Support Node 21 - by @sheremet-va (92f7a)
- Don't use
Custom
internally - by @sheremet-va (46fc5) - browser:
- Improve source maps when
vi.mock
is present - by @sheremet-va in #6810 (8d179) - Explain TypeScript support in docs and add asymmetric matchers to types - by @sheremet-va in #6934 (ac1a7)
- Fix matchers.d.ts - by @hi-ogawa in #6995 (a485b)
- Improve source maps when
- coverage:
- Exclude browser mode iframe results - by @AriPerkkio in #6905 (e04a1)
- junit:
- Fix testsuites time to be sum of all testsuite items - by @saitonakamura in #6985 (ca37a)
- pretty-format:
- reporters:
- Write buffered stdout/stderr on process exit - by @AriPerkkio in #6932 (80cde)
- Rewrite
dot
reporter withoutlog-update
- by @AriPerkkio in #6943 (be969) - Check
--hideSkippedTests
in base reporter - by @AriPerkkio in #6988 (721a5) - Show
retry
andrepeats
counts - by @AriPerkkio and @hi-ogawa in #7004 (3496a)
- typecheck:
- types:
- Make parameters non-nullable for Playwright options - by @apple-yagi in #6989 (fe2a1)
- vite-node:
View changes on GitHub
v2.1.8
v2.1.7
🐞 Bug Fixes
- Revert support for Vite 6 - by @sheremet-va (fbe5c)
- This introduced some breaking changes (#6992). We will enable support for it later. In the meantime, you can still use
pnpm.overrides
or yarn resolutions to override thevite
version in thevitest
package - the APIs are compatible.
- This introduced some breaking changes (#6992). We will enable support for it later. In the meantime, you can still use
View changes on GitHub
v2.1.6
v2.2.0-beta.2
🚀 Features
- reporter: Add support for function type to classname option in the junit reporter - by @jpleclerc, Jean-Philippe Leclerc and @hi-ogawa in #6839 (dc238)
- reporters:
summary
option forverbose
anddefault
reporters - by @AriPerkkio in #6893 (511b7) - ui: Allow run individual tests/suites from the UI - by @userquin in #6641 (d9cc8)
🐞 Bug Fixes
- Misc fix for vite 6 ecosystem ci - by @hi-ogawa in #6867 (80f8b)
- Respect
cacheDir
when optimizer is enabled - by @hi-ogawa in #6910 (0b08b) - coverage: Exclude browser mode iframe results - by @AriPerkkio in #6905 (e04a1)
- pretty-format: Support react 19 - by @hi-ogawa in #6909 (bd29b)
View changes on GitHub
v2.2.0-beta.1
🚀 Features
- Support inline
diff
options and supportprintBasicPrototype
- by @hi-ogawa, @sheremet-va and Michał Grzegorzewski in #6740 (39186) - Allow a custom note when calling
ctx.skip()
dynamically - by @sheremet-va in #6805 (697c3) - expect:
- Add
toHaveBeenCalledExactlyOnceWith
expect matcher - by @jacoberdman2147 and @sheremet-va in #6894 (ff662) - Add
toHaveBeenCalledAfter
andtoHaveBeenCalledBefore
utility - by @Barbapapazes and @sheremet-va in #6056 (85e6f)
- Add
- runner:
- Test context can inject values from the config's
provide
- by @sheremet-va in #6813 (85c64)
- Test context can inject values from the config's
- snapshot:
- vitest:
- Include
coverageMap
in json report - by @sheremet-va in #6606 (9c8f7) - Add
onTestsRerun
method to global setup context - by @sheremet-va in #6803 (e26e0)
- Include
🐞 Bug Fixes
- browser: Improve source maps when
vi.mock
is present - by @sheremet-va in #6810 (8d179)
View changes on GitHub
v2.1.5
🐞 Bug Fixes
dangerouslyIgnoreUnhandledErrors
without base reporter - by @AriPerkkio in #6808 (0bf0a)- Capture
unhandledRejection
even when base reporter is not used - by @AriPerkkio in #6812 (8878b) - Don't change the working directory when loading workspace projects - by @sheremet-va in #6811 (f0aea)
- Remove
sequence.concurrent
from theRuntimeConfig
type - by @sheremet-va in #6880 (6af73) - Stop the runner before restarting, restart on workspace config change - by @sheremet-va in #6859 (b01df)
- Don't rerun on Esc or Ctrl-C during watch filter - by @hi-ogawa in #6895 (98f76)
- Print ssrTransform error - by @hi-ogawa in #6885 (4c96c)
- Throw an error and a warning if
.poll
,.element
,.rejects
/.resolves
, andlocator.*
weren't awaited - by @sheremet-va in #6877 (93b67) - browser:
- Don't process the default css styles - by @sheremet-va in #6861 (0d67f)
- Support non US key input - by @hi-ogawa in #6873 (5969d)
- Stop the browser rpc when the pool is closed - by @sheremet-va in #6858 (9a0c9)
- Init browsers eagerly when tests are running - by @sheremet-va in #6876 (417bd)
- coverage:
- Report uncovered files when re-run by
enter
or'a'
- by @AriPerkkio in #6848 (487c8)
- Report uncovered files when re-run by
- ui:
- vite-node:
- vitest:
- Use fetch() implementation from happy-dom - by @capricorn86 in #6879 (3c56f)
🏎 Performance
- Limit workspace project concurrency to available cores - by @sheremet-va in #6869 (f4c04)
View changes on GitHub
v2.1.4
🚀 Features
This patch release includes a non-breaking feature for the experimental Browser Mode that doesn't follow SemVer. If you want to avoid picking up releases like this, make sure to pin the Vitest version in your package.json
. See npm's documentation about semver for more information.
- browser: Allow custom HTML path, respect plugins
transformIndexHtml
- by @sheremet-va in #6725 (16902)
🐞 Bug Fixes
- windows:
- Don't normalize drive case letter in root - by @sheremet-va in #6792 (b28cd)
- browser:
- Fix default browser port - by @hi-ogawa in #6700 (9c518)
- Optimize expect-type - by @sheremet-va in #6713 (07918)
- Don't polyfill process.env - by @sheremet-va in #6718 (da6d2)
- Increment browser port automatically if there are several projects with browser.enabled - by @sheremet-va in #6717 (a9397)
- Cleanup keyboard state - by @hi-ogawa in #6731 (19278)
- Don't add
v=
queries to setup files imports - by @sheremet-va in #6759 (b8258) - User event cleanup on retry - by @hi-ogawa in #6764 (bdd15)
- Ignore non mocked msw requests - by @sheremet-va in #6770 (9d9ba)
- Initiate MSW in the same frame as tests - by @sheremet-va in #6772 (2444f)
- deps:
- expect:
- mocker:
- Remove spy from peer dependencies - by @sheremet-va in #6777 (3a8b5)
- vitest:
- Clarify slowTestThreshold, print slow tests in non-TTY mode - by @sheremet-va in #6715 (2e6aa)
- Print warnings form Vite plugins - by @sheremet-va in #6724 (121b1)
- Don't fail if the working directory starts with a lowercase drive letter - by @sheremet-va in #6779 (df6d7)
- Silence import analysis warning - by @hi-ogawa in #6785 (39041)
- vitest,runner: