chore(deps): update dependency vitest to v2
This MR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
vitest (source) | ^1.2.2 -> ^2.0.0 |
Release Notes
vitest-dev/vitest (vitest)
v2.0.4
🐞 Bug Fixes
- One-line environment options - by @hahanein in https://github.com/vitest-dev/vitest/issues/5105 (38269)
- Resolve assets imported with
require
- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6159 (807a2) -
browser:
- Don't panic if @vitest/browser is installed outside of project root - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6135 (ccfcd)
- Set global filepath - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6190 (0d0b4)
- Allow preview and open in the editor screenshot error from ui - by @userquin in https://github.com/vitest-dev/vitest/issues/6113 (2d620)
-
coverage:
- Global thresholds to include files from glob thresholds - by @thor-juhasz and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6172 (02e3f)
- Consistent type-only file handling - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6183 (90576)
- Ignore
*.cts
files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6189 (5da45) - Add
thresholds.<glob>.100
option - by @thor-juhasz and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6174 (f6845)
-
spy:
- Fix
mockImplementation
for function overload and unions - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6181 (7a75b)
- Fix
View changes on GitHub
v2.0.3
🚀 Features
- ui: Show all suites/tests when parent matches - by @userquin in https://github.com/vitest-dev/vitest/issues/6106 (840e0)
🐞 Bug Fixes
-
--inspect-brk
stop on Windows - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6110 (f8519) -
browser:
- Don't import from "vite" - by @sheremet-va (35655)
- Allow immidiate reinvalidation of mocked dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6108 (f44cc)
-
spy:
- Fix type error when assigning
vi.spyOn
toMockInstance
of function overload - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6086 (e9f9a)
- Fix type error when assigning
-
vite-node:
- Remove suffix slash on file protocol for window - by @syi0808 in https://github.com/vitest-dev/vitest/issues/6109 (93ebd)
View changes on GitHub
v2.0.2
🐞 Bug Fixes
-
browser:
- Remove @vitest/runner > pretty-format from prebundling because it doesn't exist - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6075 (a169d)
- Inline pretty-format and replace picocolors with tinyrainbow - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6077 (80a43)
- Remove
crypto.randomUUID
from the client - by @userquin in https://github.com/vitest-dev/vitest/issues/6079 (04c83) - Correctly overwrite loupe require - by @sheremet-va (756ac)
- Dedupe @vitest/browser/client - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6081 (ee725)
- Don't release keyboard automatically - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6083 (58fac)
-
ui:
- Test files notified only when running - by @userquin in https://github.com/vitest-dev/vitest/issues/6069 (af7fe)
- Encode html entities in task name - by @userquin and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6070 (7f0cc)
-
web-worker:
- Peer dependency version on
vitest
- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6060 (95a2d)
- Peer dependency version on
🏎 Performance
- browser: Don't import msw if no modules are mocked - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6073 (aa527)
View changes on GitHub
v2.0.1
🐞 Bug Fixes
- browser: Correctly inherit browser config in a workspace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6054 (4b03e)
- ui: Move virtual scroller to dev dependencies - by @userquin in https://github.com/vitest-dev/vitest/issues/6053 (f94ed)
- vitest: Print only running files, not every file - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6052 (4d559)
View changes on GitHub
v2.0.0
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 https://github.com/vitest-dev/vitest/pull/4784 (a0c1d37)
- Remove
--segfault-retry
- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5514 (ed60e)- This flag was introduced to combat
threads
segfaults. Our current recommendation is to use the new defaultforks
pool instead.
- This flag was introduced to combat
- Run suite hooks in a stack - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/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.
- This feels like a more sensible default. Especially with the new
- Enable
coverage.ignoreEmptyLines
by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/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 https://github.com/vitest-dev/vitest/issues/5423 for more details.
-
- Add correct location and snapshot fields in json reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5434 (bcccc)
- Previously, the
location
field pointed to the error location instead of the test location. Now it is aligned with jest and contains theline
andcolumn
of a test function, but requiresincludeTaskLocation
to be enabled.
- Previously, the
- Update dependency chai to v5 - by renovate[bot] and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5135 (73646)
- Remove watchExclude - by @patak-dev in https://github.com/vitest-dev/vitest/issues/5177 (d7371)
- Change default
pool
to'forks'
- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5047 (7f8f9)- This change is done for compatibility issues
- This pool may be slightly slower than previous
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 (b7438) - Add promise-based return assertions, do not auto-resolve returned promises - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5749 (5f710)
-
⚠ ️ Vitest no longer unwraps promises inspy.mock.returns
. If the function is async or returns a promise, it will always succeed and have aPromise
inresults
. To make migration easier, we introducedspy.mock.settledResults
that unwraps promises andexpect().toHaveResolved()
matcher that accepts unwrapped value.
-
- Do not exit process if global setup has failed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5726 (ddb09)
- Don't exit process if config failed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5715 (f232f)
- Add meta to
json
output - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5802 (dd754) - Rename
indexScripts
toorchestratorScripts
in the browser config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5842 (49f34) - Add "vitest list" API to print collected tests without running them - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6013 (583dd)
-
⚠ ️ This changes the custompool
API - now requirescollectTests
method alongsiderunTests
.
-
- Remove the empty suite from the runner - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5435 (dbbbe)
- Support concurrent suites - by @hi-ogawa in https://github.com/vitest-dev/vitest/pull/5491 (222ce44)
- Support overriding
exclude
in coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5997 (169bc)-
⚠ ️ Vitest coverage no longer adds test files toexclude
patterns ifcoverage.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
-
browser:
-
🌐 This release lays the groundwork for the next iteration of Vitest Browser Mode. You can read more about our future plans at https://github.com/vitest-dev/vitest/discussions/5828 - Add commands to communicate betweens server and the browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5097 (aa431)
- Do not reload the page during watch mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5810 (e5b9a)
- Support changing the viewport - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5811 (71851)
- Add browser iframe mouse interaction - by @userquin in https://github.com/vitest-dev/vitest/issues/5815 (f29b9)
- Support
click
event - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5777 (839c3) - Rename none provider to preview, make it default - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5826 (18310)
- Run tests in parallel in headless mode, add
page.screenshot
method - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5853 (81c42) - Implement several
userEvent
methods, addfill
anddragAndDrop
events - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5882 (4dbea) - Introduce
expect.dom
method and bundlejest-dom
matchers with@vitest/browser
- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5910 (3a96a) - Expose CDP in the browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5938 (bec43)
- Add "init" command for browser tests - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5960 (49e97)
- Add an option to take screenshots if the browser test fails - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5975 (154cb)
- Add
tripleClick
to interactive api - by @userquin in https://github.com/vitest-dev/vitest/issues/5987 (200a4) - Playwright provider doesn't allow resizing the browser viewport - by @userquin and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5984 (ff978)
-
- Pretty print diffs coming from cause - by @dubzzz in https://github.com/vitest-dev/vitest/issues/5660 (6faf8)
- Allow import statement as vi.mock path for better IDE support - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5690 (a99a1)
- Remove deprecated options - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5696 (5c308)
- Add blob reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5663 (e2053)
-
✅ Run Vitest in separate processes with--reporter=blob
flag to generate reports and combine them withvitest --merge-reports
later!
-
- Add expect.poll utility - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5708 (e2e0f)
- Add browser.ui option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5771 (a5033)
- Add median to
--output-json
- by @Joristdh in https://github.com/vitest-dev/vitest/issues/5745 (0766b) - Allow augmenting config.test.env - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5784 (b2469)
- Implement module mocking in browser mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5765 (7b2f6)
- Allow configuring expect options in the config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5729 (fc53f)
- Add an option to print console stack trace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5720 (e4fe6)
- Add browser frame to UI - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5808 (3796d)
- Image type add bmp - by btea in https://github.com/vitest-dev/vitest/issues/5921 (98f9b)
- Add an option to return base64 from page.screenshot - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5993 (be323)
- Expose
parseAst
,parseAstAsync
from vite - by @sheremet-va (f645e) -
config:
- Allow percentage value for workers option - by @syi0808 in https://github.com/vitest-dev/vitest/issues/5982 (b1a27)
-
runner:
- Implement
test.for
- by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5861 (c2380)
- Implement
-
spy:
- Collect mock.contexts - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5955 (3b31a)
-
ui:
- Render tests in a tree - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5807 (7900f)
- Load module graph on tab selection - by @userquin in https://github.com/vitest-dev/vitest/issues/5844 (b117e)
- Replace navigation tree with test explorer - by @userquin in https://github.com/vitest-dev/vitest/issues/5907 (45dfc)
- Add initializing explorer logic - by @userquin in https://github.com/vitest-dev/vitest/issues/5941 (c31c4)
- Add action to explorer item to show the test/suite line in the source code tab - by @userquin and Anjorin Damilare in https://github.com/vitest-dev/vitest/issues/5948 (7ec29)
-
ws-client:
- Allow change reactive for state, filesMap and idMap - by @userquin in https://github.com/vitest-dev/vitest/issues/5906 (e6020)
🐞 Bug Fixes
- Print console statements in vmThreads - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5678 (34a80)
- Repeatable
--exclude
option - by @fregante in https://github.com/vitest-dev/vitest/issues/5782 (d6700) - Remove browser.fileParallelism - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5790 (b881e)
- Install UI icons - by @sheremet-va (b84f1)
- Remove process.exit if workspace project failed to be created - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5804 (a820e)
- Vi.waitFor/vi.waitUntil interval is now cleared after it times out - by @pedro00dk in https://github.com/vitest-dev/vitest/issues/5875 (04107)
- ToJSON recursive error serialization - by @eddienubes in https://github.com/vitest-dev/vitest/issues/5848 and https://github.com/vitest-dev/vitest/issues/5884 (8d55d)
- Print error properties only in verbose reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5917 (2bd8d)
- Use TTY reporter when running in Deno - by @marvinhagemeister in https://github.com/vitest-dev/vitest/issues/5972 (e0f45)
- Don't override uppercase - by @sheremet-va (caef4)
- Clear screen and scrollback on iTerm2 - by @kxalex in https://github.com/vitest-dev/vitest/issues/5978 (d7f23)
- Include pretty-format in @vitest/runner for optimization on npm - by @sheremet-va (42bd4)
- Transpile esnext to node18 to support newest JS and TS features - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4409 (8f65a)
-
api:
- Correct
project.provide
type - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5959 (0eda9) - Don't call process.exit manually - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5926 (e9b63)
- Correct
-
browser:
- Display UI - by @sheremet-va (d41e4)
- Browser actions icons colors - by @userquin in https://github.com/vitest-dev/vitest/issues/5816 (f9d9b)
- Restore the original viewport when unselecting the preset viewport - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5821 (5ebb3)
- Don't get stuck after the manual page refresh - by @sheremet-va (2220b)
- Use iframe id instead of calculating it from filenames - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5823 (34a31)
- Always clean up iframes on rerun - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5827 (087fa)
- Support @testing-library/vue in browser mode out of the box - by @sheremet-va (76b82)
- Print correct transformed module graph - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5833 (a7581)
- Use
preview
provider when running in StackBlitz - by @userquin in https://github.com/vitest-dev/vitest/issues/5836 (76e13) - Specify entries for correct deps optimization - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5839 (c79b3)
- Allow iframe to load even if there is a custom CSP header - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5841 (caaaf)
- Don't optimize Vitest dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5843 (f15b4)
- Set server.open to false and move error handling after init - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5845 (47003)
- Show correct prepare time - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5852 (52d54)
- Resolve
coverage.reporter
from string values - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5920 (f33da) - Correctly update inline snapshot if changed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5925 (2380c)
- Remove "util" warning - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5935 (48f28)
- Remove hacky retry - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5971 (2a2c9)
- Make userEvent more stable when running in parallel - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5974 (14a21)
- Print screenshot path alongside the test error message - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5992 (15289)
- Print correct stack trace in source files - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6003 (62aa7)
- Correctly mock optimized cjs dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6035 (057b4)
- Support shadow root and svg elements - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6036 (2e3c8)
-
coverage:
- Clean up empty coverage reports directory - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5731 (c469c)
-
thresholds.autoUpdate
to supportmergeConfig
- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5818 (7afb3) - Pass thresholds errors to
stderr
ofstartVitest()
- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5954 (70805) - Exclude bench files from coverage - by @kouak in https://github.com/vitest-dev/vitest/issues/5983 (429e1)
- Vite to ignore dynamic import of provider - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5998 (6d884)
- Istanbul to support import attributes - by @Gravitonic in https://github.com/vitest-dev/vitest/issues/6006 (2898a)
- Remove work-around for implicit
else
- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6014 (368c1)
-
deps:
- Update dependency @testing-library/dom to v10 - by renovate[bot] in https://github.com/vitest-dev/vitest/issues/5866 (e9745)
- Update vulnerable
test-exclude
to v7 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5867 (0a715)
-
expect:
- Fix immutable.js iterable equality - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5692 (1532c)
-
forks:
- Resolve
poolOptions.<name>.isolate
fromforks
options - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5840 (a60a1)
- Resolve
-
runner:
- Ensure inner suite { sequential: true } correctly overrides outer suite { concurrent: true } - by @pengooseDev in https://github.com/vitest-dev/vitest/issues/5737 (a20e7)
- Ensure test.each print -0 and -NaN properly - by @pengooseDev in https://github.com/vitest-dev/vitest/issues/5806 (9ac8f)
-
snapshot:
- Fix
toMatchFileSnapshot
with empty file - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5894 (88006)
- Fix
-
spy:
- Correctly track constructor's "this" type - by @sheremet-va (4776e)
-
types:
- Mark pool options as not available in project config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5934 (486fd)
-
ui:
- Show correct module graph and project name in a Vitest workspace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5792 (48c50)
- Update running todo tests inside todo suites (each) - by @userquin in https://github.com/vitest-dev/vitest/issues/5939 (63ae1)
-
FileDetails
title status icon not being updated - by @userquin in https://github.com/vitest-dev/vitest/issues/5942 (e9ddf)
-
ui, browser:
- Disable mouse events when resizing main navigation panel - by @userquin in https://github.com/vitest-dev/vitest/issues/5863 (7cbd9)
-
utils:
- Produce valid snapshot names - by @dubzzz in https://github.com/vitest-dev/vitest/issues/5724 (1ec61)
- Fix color util maximum call stack error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5733 (a4ec5)
- Package exports - by @userquin in https://github.com/vitest-dev/vitest/issues/5847 (07876)
-
vite-node:
- Expose all envs from .env file, not just with a prefix
VITE_
- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6017 (d87be)
- Expose all envs from .env file, not just with a prefix
-
vitest:
- Expose
provide
to the public API - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5897 (66e64) - Cache fs code only for forks pool - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5909 (e30d9)
- Allow testing unandled rejection/exception - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6016 (c8d56)
- Show all failed tests when rerunning a test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6022 (91ba6)
- Expose
View changes on GitHub
v1.6.0
🚀 Features
- Support standalone mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5565 (bdce0)
- Custom "snapshotEnvironment" option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5449 (30f72)
- benchmark: Support comparing benchmark result - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5398 (f8d3d)
- browser: Allow injecting scripts - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5656 (21e58)
-
reporter: Support
includeConsoleOutput
andaddFileAttribute
in junit - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5659 (2f913) - ui: Sort items by file name - by @btea in https://github.com/vitest-dev/vitest/issues/5652 (1f726)
🐞 Bug Fixes
- Keep order of arguments for .each in custom task collectors - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5640 (7d57c)
- Call
resolveId('vitest')
afterbuildStart
- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5646 (f5faf) - Hash the name of the file when caching - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5654 (c9e68)
- Don't panic on empty files in node_modules - by @sheremet-va (40c29)
- Use
toJSON
for error serialization - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5526 (19a21) -
coverage:
- Exclude
*.test-d.*
by default - by @MindfulPol in https://github.com/vitest-dev/vitest/issues/5634 (bfe8a) - Apply
vite-node
's wrapper only to executed files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5642 (c9883)
- Exclude
-
vm:
- Support network imports - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5610 (103a6)
🏎 Performance
- Improve performance of forks pool - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5592 (d8304)
- Unnecessary rpc call when coverage is disabled - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5658 (c5712)
View changes on GitHub
v1.5.3
🐞 Bug Fixes
- Use package.json name for a workspace project if not provided - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5608 (48fba)
- Backport jest iterable equality within object - by @sukovanej in https://github.com/vitest-dev/vitest/issues/5621 (30e5d)
- browser: Support benchmark - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5622 (becab)
- reporter: Use default error formatter for JUnit - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5629 (20060)
View changes on GitHub
v1.5.2
🐞 Bug Fixes
- Check for null before storing in weakmap - by @sheremet-va (ce368)
View changes on GitHub
v1.5.1
🚀 Features
-
api:
startVitest()
to acceptstdout
andstdin
- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5493 (780b1)- This is listed as a feature, but it doesn't increase the minor version because
startVitest
API is experimental and doesn't follow semver.
- This is listed as a feature, but it doesn't increase the minor version because
🐞 Bug Fixes
- Close vite servers on all resolved projects - by @surc54 in https://github.com/vitest-dev/vitest/issues/5544 (413ec)
- Fix default
import.meta.env.PROD: false
- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5561 (9c649) - Resolve cwd correctly when initiating projects - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5582 (ec9d7)
- Always run
onTestFinished
in reverse order - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5598 (23f29) -
browser:
- Disable
fileParallelism
by default on browser pool - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5528 (5c69f) - Dispose tester iframe on done - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5595 (b2135)
- Disable
-
coverage:
- Fix bundling of
v8-to-istanbul
- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5549 (df6a4) - Prevent crash when
cleanOnRerun
is disabled - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5540 (ea3c1) -
thresholds
to compare files relative to root - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5574 (80265)
- Fix bundling of
-
expect:
- Fix
toEqual
andtoMatchObject
with circular references - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5535 (9e641)
- Fix
-
vitest:
- Fix false positive file filter match with leading slash - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5578 (316eb)
- Watch the output directory correctly - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5584 (e40f9)
- StubEnv casts boolean on PROD/SSR/DEV - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5590 (4da88)
View changes on GitHub
v1.5.0
🚀 Features
- Add configuration for diff truncation - by @willieho in https://github.com/vitest-dev/vitest/issues/5073 and https://github.com/vitest-dev/vitest/issues/5333 (6797b)
- Remove unrelated noise from diff for toMatchObject() - by @geersch in https://github.com/vitest-dev/vitest/issues/5364 (99276)
- Allow custom host for --inspect and --inspect-brk - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5509 (61572)
- coverage: V8 to ignore empty lines, comments, types - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5457 (10b89)
🐞 Bug Fixes
-
describe
calls not taking generic type parameters - by @aryaemami59 in https://github.com/vitest-dev/vitest/issues/5415 (16bac) - Prevent hang when
process
is mocked - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5430 (0ec4d) - Don't check for "node:internal/console/" in console interceptor in case the environment is not Node.js - by @sheremet-va (87d36)
- The value received by toMatch should be a string - by @btea in https://github.com/vitest-dev/vitest/issues/5428 (67485)
- Increase stack trace limit for location, don't hardcode suite position - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5518 (04b23)
-
benchmark:
- Run benchmark suites sequentially - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5444 (1f548)
- Fix benchmark summary of single bench suite - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5489 (db981)
- Table reporter for non TTY output - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5484 (bea23)
-
expect:
- Fix
toHaveBeenNthCalledWith
error message when not called - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5420 (e5253)
- Fix
-
types:
- Pass correct type for suite factory - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5437 (26718)
-
utils:
- Fix object diff with getter only property - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5466 (366d9)
-
vite-node:
- Fix
isValidNodeImport
to check"type": "module"
first - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5416 (6fb15)
- Fix
-
vitest:
- Correctly send console events when state changes - by @sheremet-va (3463f)
- Initiate FakeTimers on demand - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5450 (e4e93)
- Check unhighlighted code for code frame line limit - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5465 (6ae7e)
- Correctly filter by parent folder - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5408 (91b06)
- Close inspector immediately if run is canceled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5519 (b8006)
-
workspace:
- Set CWD to config directory, allow overriding local .env - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5476 (d4003)
View changes on GitHub
v1.4.0
🚀 Features
- Throw error when using snapshot assertion with
not
- by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5294 (b9d37) - Add a flag to include test location in tasks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5342 (d627e)
-
cli:
- Support wildcards in
--project
option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5295 (201bd)
- Support wildcards in
-
config:
- Add
shuffle.files
andshuffle.tests
options - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5281 (356db) - Deprecate
cache.dir
option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5229 (d7e8b)
- Add
-
coverage:
- Support
--changed
option - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5314 (600b4)
- Support
-
vitest:
- Support
clearScreen
cli flag - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5241 (e1735)
- Support
🐞 Bug Fixes
- Repeatable
--project
option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5265 (d1a06) -
--inspect-brk
to pause before execution - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5355 (e77c5) - Correct locations in test.each tasks - by @sheremet-va (4f6e3)
-
api:
- Use resolvedUrls from devserver - by @saitonakamura and @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5289 (2fef5)
-
browser:
- Add
magic-string
tooptimizeDeps.include
- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5278 (8f04e)
- Add
-
coverage:
- Expensive regexp hangs v8 report generation - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5259 (d68a7)
- V8 to ignore type-only files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5328 (c3eb8)
- Respect source maps of pre-transpiled sources - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5367 (6eda4)
- Prevent
reportsDirectory
from removing user's project - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5376 (07ec3)
-
expect:
- Show diff on
toContain/toMatch
assertion error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5267 (8ee59)
- Show diff on
-
forks:
- Wrap
defines
to supportundefined
values - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5284 (5b58b)
- Wrap
-
typecheck:
- Update get-tsconfig 4.7.3 to fix false circularity error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5384 (bdc37)
-
ui:
- Escape html in error diff - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5325 (ab60b)
-
vitest:
- Loosen
onConsoleLog
return type - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5337 (6d1b1) - Ensure restoring terminal cursor on close - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5292 (0bea2)
- Ignore timeout on websocket reporter rpc - by @sheremet-va (38119)
- Correctly override api with --no-api flag - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5386 (51d1d)
- Logs in
beforeAll
andafterAll
- by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5288 (ce5ca)
- Loosen
-
workspace:
- Throw error when browser mode and
@vitest/coverage-v8
are used - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5250 (29f98)
- Throw error when browser mode and
View changes on GitHub
v1.3.1
🚀 Features
-
vitest: Expose parseCLI method - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5248 (c793a)
- This feature is not affected by SemVer because it is part of an experimental API.
🐞 Bug Fixes
- Add task tests iteratively - by @DerYeger in https://github.com/vitest-dev/vitest/issues/5235 (38155)
- coverage: Ignore generated TS decorators - by @AriPerkkio and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5206 (a2804)
- ui: Auto reload coverage iframe after test run - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5242 (5376d)
View changes on GitHub
v1.3.0
🚀 Features
- Deprecate watchExclude - by @patak-dev in https://github.com/vitest-dev/vitest/issues/5171 (82885)
-
browser:
- Run test files in isolated iframes - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5036 (4f401)
-
config:
- Add
snapshotSerializers
option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5092 (5b102)
- Add
-
reporters:
- Support custom options - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5111 (fec9c)
-
runner:
- Support automatic fixtures - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5102 (0441f)
-
ui:
- Save splitpanes size to local storage - by @posva in https://github.com/vitest-dev/vitest/issues/5166 (c28b4)
-
vitest:
- Add onTestFinished hook - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5128 (6f5b4)
- Add github actions reporter - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5093 (40afb)
- Expose jsdom global if jsdom environment is enabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5155 (567d2)
- Add new CLI options - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5163 (4e179)
- "test" accepts options object as the second parameter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5142 (7d9b1)
-
vm:
- Support wasm module - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5131 (5ed53)
🐞 Bug Fixes
- Fix sourcemap in vm pools - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5063 (81105)
- Don't optimize react/jsx-runtime by default when running in Node - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5079 (0d2bf)
- Rpc timeout error messages to include caller - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5103 (a6e04)
- Requires fixed version across the monorepo - by @antfu in https://github.com/vitest-dev/vitest/issues/5208 (68f51)
- Prevent merging of
poolOptions
- by @penalosa in https://github.com/vitest-dev/vitest/issues/5221 (bc5b2) -
browser:
- Don't exclude node builtins from optimization - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5082 (714c9)
- Support
coverage.reportsDirectory
with multiple directories - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5056 (ae73f)
-
cli:
- Parse
--browser=<name>
correctly - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5179 (656e2)
- Parse
-
coverage:
-
.tmp
directory conflicts with--shard
option - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5184 (5749d)
-
-
deps:
- Update dependency strip-literal to v2 - by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/5136 (ef557)
-
reporters:
- Testsuite name should include project root in Junit output - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5116 (2494f)
-
typecheck:
- Fix suite collection while-loop - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5065 (35675)
-
ui:
- Fix tests duration time - by @vovsemenv in https://github.com/vitest-dev/vitest/issues/5219 (58103)
-
utils:
- Fix asymmetric matcher diff inside array - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5189 (3ffcd)
-
vitest:
- Correctly report failed test files as failures in json reporter, export json reporter types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5081 (0417b)
- Don't run typecheck tests in browser if both are enabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5080 (1045b)
- Handle function config inside
defineWorkspace
- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5089 (0bf52) - Remove excessive listeners when running without isolation, don't reset the state - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5132 (b607f)
- Auto-enable "github-actions" only where users didn't configure reporters - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5158 (ef044)
- Support more array cli options - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5162 (3afe6)
- Add types for the new global
jsdom
variable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5164 (0f898) - Expose onTestFinished globally - by @sheremet-va (1304f)
- Disable optimizer by default until it's stable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5156 (e1bd8)
- Delegate snapshot options to workspace from root config - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5199 (86297)
- Fix
optimizeDeps.disabled
warnings on Vite 5.1 - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5215 (1aecd)
-
vm:
- Handle
disableConsoleIntercept
config - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5074 (a55ad) - Improve error when module is not found - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5053 (79a50)
- Handle
View changes on GitHub
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.