Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
v3.2.0
🚀 Features
- Provide
ctx.signal- by @sheremet-va in #7878 (e761f) - Support custom colors for
test.name- by @AriPerkkio in #7809 (4af5d) - Add
vi.mockObjectto automock any object - by @hi-ogawa and @sheremet-va in #7761 (465bd) - Introduce
watchTriggerPatternsoption - by @sheremet-va in #7778 (a0675) - Deprecate
workspacein favor ofprojects- by @sheremet-va and @AriPerkkio in #7923 (41beb) - Explicit Resource Management support in mocked functions - by @EskiMojo14 in #7927 (b67d3)
- Add
sequence.groupOrderoption - by @sheremet-va in #7852 (d1a1d) - Initial support for Temporal equality - by @dirkluijk in #8007 (52bd7)
- Support Vite 7 - by @sheremet-va in #8003 (1716b)
- Track module execution totalTime and selfTime - by @abrenneke in #8027 (95961)
- Annotation API - by @sheremet-va in #7953 (b03f2)
- browser:
- Implement
connectoption forplaywrightbrowser provider - by @egfx-notifications and @sheremet-va in #7915 (029c0) - Add
screenshot.saveoption - by @sheremet-va in #7777 (d9f51) - Custom locators API - by @sheremet-va in #7993 (e6fbd)
- Implement
- coverage:
- V8 experimental AST-aware remapping - by @AriPerkkio in #7736 (78a3d)
- reporter:
- Add
onWritePathoption togithub-actions- by @nwalters512 and @AriPerkkio in #8015 (abd3b)
- Add
- vitest:
- Allow per-file and per-worker fixtures - by @sheremet-va and @AriPerkkio in #7704 (9cbfc)
🐞 Bug Fixes
- Replace
micromatchwithpicomatch- by @sapphi-red in #7951 (df076) - Try to catch unhandled error outside of a test - by @sheremet-va in #7968 (46421)
- Generate a separate config for "vitest init browser" instead of a workspace file - by @sheremet-va in #7934 (e84e2)
- Switch ExpectStatic
anytypes toAsymmetricMatcher<unknown>, withDeeplyAllowMatchers<T>- by @JoshuaKGoldberg in #7016 (8ec44) - Remove unused exports - by @sheremet-va in #7618 (33d05)
- Throw an error if typechecker failed to spawn - by @sheremet-va in #7990 (0e960)
- Ignore non-string
stackproperties - by @sheremet-va in #7995 (330f9) - Apply browser CLI options only if the project has the browser set in the config already - by @sheremet-va in #7984 (70358)
- Ensure errors keep their message and stack after
toJSONserialisation - by @sheremet-va in #8053 (3bdf0) - browser:
- Resolve FS commands relative to the project root - by @sheremet-va in #7896 (69ac9)
- Run tests serially if provider doesn't provide a mocker - by @sheremet-va in #8032 (227a9)
- Resolve
uploadfiles relative to the project root - by @sheremet-va in #8042 (b9a31) - Await mocker invalidation to avoid race condition with "mock wasn't registered" - by @sheremet-va in #8021 (b34ff)
- Share vite cache with the project cache - by @sheremet-va in #8049 (0cbad)
- Add
thistype tolocators.extend- by @sheremet-va in #8069 (70fb0)
- cache:
- cli:
- Add built-in reporters list to --help output - by @pengooseDev in #7955 (ef6ef)
- Parse
--silentvalues properly - by @AriPerkkio in #8055 (8fad7)
- coverage:
- Istanbul provider to not use Vite preserved query params - by @AriPerkkio in #7939 (a05d4)
- Browser + v8 in source tests missing - by @AriPerkkio in #7946 (51cd8)
- In-source test cases excluded - by @AriPerkkio in #7985 (407c0)
- dev:
- Fix relay of custom equality testers - by @StefanLiebscher in #6140 (6dc1d)
- expect:
- Unbundle
@types/chai- by @hi-ogawa in #7937 (525f5) - Support type-safe declaration of custom matchers - by @kettanaito and @sheremet-va in #7656 (e996b)
- Unbundle
- reporters:
- Check the test result again when tests are rerunning - by @sheremet-va in #8063 (35e31)
- spy:
- Copy over static properties from the function - by @sheremet-va in #7780 (9b9f0)
- typecheck:
- Don't panic during
vitest listcommand - by @sheremet-va in #7933 (ba6da) - Avoid creating a temporary tsconfig file when typechecking - by @sheremet-va in #7967 (34f43)
- Don't panic during
- vite-node:
- vitest:
- Adjust
getWorkerMemoryLimitpriority for vmForks - by @pe...
- Adjust
v3.2.0-beta.3
🚀 Features
- Initial support for Temporal equality - by @dirkluijk in #8007 (52bd7)
- Support Vite 7 - by @sheremet-va in #8003 (1716b)
- reporter: Add
onWritePathoption togithub-actions- by @nwalters512 and @AriPerkkio in #8015 (abd3b)
🐞 Bug Fixes
- Throw an error if typechecker failed to spawn - by @sheremet-va in #7990 (0e960)
- Ignore non-string
stackproperties - by @sheremet-va in #7995 (330f9) - Apply browser CLI options only if the project has the browser set in the config already - by @sheremet-va in #7984 (70358)
- browser:
- Run tests serially if provider doesn't provide a mocker - by @sheremet-va in #8032 (227a9)
- Resolve
uploadfiles relative to the project root - by @sheremet-va in #8042 (b9a31) - Await mocker invalidation to avoid race condition with "mock wasn't registered" - by @sheremet-va in #8021 (b34ff)
- cache:
- coverage:
- Browser + v8 in source tests missing - by @AriPerkkio in #7946 (51cd8)
- expect:
- Support type-safe declaration of custom matchers - by @kettanaito and @sheremet-va in #7656 (e996b)
- vite-node:
- webdriverio:
- Don't scale the iframe - by @sheremet-va in #8033 (c23b0)
Note
playwright and preview still scale it for better DX, but webdriver has fundamental issues with it. We are looking for a solution that works across all providers
View changes on GitHub
v3.2.0-beta.2
🚀 Features
- Explicit Resource Management support in mocked functions - by @EskiMojo14 in #7927 (b67d3)
- Add
sequence.groupOrderoption - by @sheremet-va in #7852 (d1a1d) - browser:
- Add
screenshot.saveoption - by @sheremet-va in #7777 (d9f51) - Custom locators API - by @sheremet-va in #7993 (e6fbd)
- Add
🐞 Bug Fixes
- Replace
micromatchwithpicomatch- by @sapphi-red in #7951 (df076) - Try to catch unhandled error outside of a test - by @sheremet-va in #7968 (46421)
- Generate a separate config for "vitest init browser" instead of a workspace file - by @sheremet-va in #7934 (e84e2)
- Switch ExpectStatic
anytypes toAsymmetricMatcher<unknown>, withDeeplyAllowMatchers<T>- by @JoshuaKGoldberg in #7016 (8ec44) - Remove unused exports - by @sheremet-va in #7618 (33d05)
- cli:
- Add built-in reporters list to --help output - by @pengooseDev in #7955 (ef6ef)
- coverage:
- Istanbul provider to not use Vite preserved query params - by @AriPerkkio in #7939 (a05d4)
- dev:
- Fix relay of custom equality testers - by @StefanLiebscher in #6140 (6dc1d)
- expect:
- typecheck:
- Don't panic during
vitest listcommand - by @sheremet-va in #7933 (ba6da) - Avoid creating a temporary tsconfig file when typechecking - by @sheremet-va in #7967 (34f43)
- Don't panic during
- vitest:
- Adjust
getWorkerMemoryLimitpriority for vmForks - by @pengooseDev in #7960 (5a91e)
- Adjust
View changes on GitHub
v3.1.4
🐞 Bug Fixes
- Apply browser CLI options only if the project has the browser set in the config already - by @sheremet-va in #8002 (64f2b)
View changes on GitHub
v3.2.0-beta.1
🚀 Features
- Provide
ctx.signal- by @sheremet-va in #7878 (e761f) - Support custom colors for
test.name- by @AriPerkkio in #7809 (4af5d) - Add
vi.mockObjectto automock any object - by @hi-ogawa and @sheremet-va in #7761 (465bd) - Introduce
watchTriggerPatternsoption - by @sheremet-va in #7778 (a0675) - Deprecate
workspacein favor ofprojects- by @sheremet-va and @AriPerkkio in #7923 (41beb) - browser: Implement
connectoption forplaywrightbrowser provider - by @egfx-notifications and @sheremet-va in #7915 (029c0) - coverage: V8 experimental AST-aware remapping - by @AriPerkkio in #7736 (78a3d)
🐞 Bug Fixes
- browser: Resolve FS commands relative to the project root - by @sheremet-va in #7896 (69ac9)
View changes on GitHub
v3.1.3
🐞 Bug Fixes
- Correctly resolve vitest import if
inline: trueis set - by @sheremet-va in #7856 (a83f3) - Fix fixture parsing with lowered async with esbuild 0.25.3 - by @hi-ogawa in #7921 (c5c85)
- Remove event-catcher code - by @sheremet-va in #7898 (deb1b)
- Reset mocks on test retry/repeat - by @sheremet-va in #7897 (2fa76)
- Ignore failures on writeToCache - by @orgads in #7893 (8c7f7)
- browser: Correctly inherit CLI options - by @sheremet-va in #7858 (03660)
- deps: Update all non-major dependencies - in #7867 (67ef7)
- reporters:
--merge-reportsto show each total run times - by @AriPerkkio in #7877 (d613b)
View changes on GitHub
v3.1.2
🐞 Bug Fixes
- Add global
chaivariable invitest/globals(fix: #7474) - by @Jay-Karia in #7771 and #7474 (d9297) - Prevent modifying
test.excludewhen same object passed incoverage.exclude- by @AriPerkkio in #7774 (c3751) - Fix already hoisted mock - by @hi-ogawa in #7815 (773b1)
- Fix test.scoped inheritance - by @hi-ogawa in #7814 (db6c3)
- Remove pointer-events-none after resizing the left panel - by @alexprudhomme in #7811 (a7e77)
- Default to run mode when stdin is not a TTY - by @kentonv, @hi-ogawa and @sheremet-va in #7673 (6358f)
- Use happy-dom/jsdom types for
envionmentOptions- by @hi-ogawa in #7795 (67430) - browser:
- coverage:
awaitprofiler calls - by @AriPerkkio in #7763 (795a6)- Expose profiling timers - by @AriPerkkio in #7820 (5652b)
- deps:
- runner:
- ui:
- vite-node:
🏎 Performance
- browser: Improve browser parallelisation - by @sheremet-va in #7665 (816a5)
View changes on GitHub
v3.1.1
🐞 Bug Fixes
- reporter:
- Report tests in correct order - by @sheremet-va in #7752 (b166e)
- Print test only once in the verbose mode - by @sheremet-va in #7738 (69ca4)
View changes on GitHub
v3.1.0
🚀 Features
- Introduce
%$option to add number of the test to its title - by @kemuridama in #7412 (df347) - Add
diff.maxDepthoption and set non-Infinityvalue as a default to reduce crash - by @hi-ogawa in #7481 (eacab) - Allow array element for
test.each/fortitle formatting - by @hi-ogawa in #7522 (ea3d6) - Add "configureVitest" plugin hook - by @sheremet-va and @AriPerkkio in #7349 (20a5d)
- Support
--configLoaderCLI option - by @Carnageous and @hi-ogawa in #7574 (2a852) - Added
vitest-browser-littovitest init browserand docs - by @EskiMojo14 and @hi-ogawa in #7705 (5659a) - Use providers request interception for module mocking - by @sheremet-va in #7576 (7883a)
- browser:
- Introduce
and,orandfilterlocators - by @sheremet-va and @AriPerkkio in #7463 (63949)
- Introduce
- reporter:
- Always render test time - by @AriPerkkio and @spamshaker in #7529 (5eba6)
--silent=passed-onlyto log failed tasks only - by @AriPerkkio in #7530 (f9e1c)
- runner:
- Add
test.scopedto overridetest.extendfixtures per-suite - by @sheremet-va in #7233 (e5851)
- Add
- vitest:
- Allow conditional
context.skip(boolean)- by @sheremet-va and @AriPerkkio in #7659 (6adec) - Support rolldown-vite in NormalizeUrlPlugin - by @sapphi-red and @sheremet-va in #7739 (1ef31)
- Allow conditional
🐞 Bug Fixes
- Update test stats regularly - by @hi-ogawa in #7700 (b7953)
- Fix vm tests flakiness - by @sheremet-va in #7741 (2702c)
- Set
diff.expand: falseas default - by @hi-ogawa in #7697 (f3420) - browser:
- Correctly calculate timeout in hooks when actions are performed - by @sheremet-va in #7747 (a5505)
- deps:
- reporter:
--hideSkippedTestsshould hide suites too - by @AriPerkkio in #7695 (ba9b5)- Report tests in correct order - by @sheremet-va in #7752 (b166e)
- Print test only once in the verbose mode - by @sheremet-va in #7738 (69ca4)
- snapshot:
🏎 Performance
- browser: Fork jest-dom instead of bundling it - by @sheremet-va in #7605 (12762)
View changes on GitHub
v3.1.0-beta.2
🚀 Features
- Add "configureVitest" plugin hook - by @sheremet-va and @AriPerkkio in #7349 (20a5d)
- browser: Introduce
and,orandfilterlocators - by @sheremet-va and @AriPerkkio in #7463 (63949) - runner: Add
test.scopedto overridetest.extendfixtures per-suite - by @sheremet-va in #7233 (e5851)
🐞 Bug Fixes
- reporter:
--hideSkippedTestsshould hide suites too - by @AriPerkkio in #7695 (ba9b5)