v2.1.0-beta.5
版本发布时间: 2024-08-12 19:48:47
vitest-dev/vitest最新发布版本:v2.1.0-beta.6(2024-08-20 21:19:10)
🚀 Features
- vitest: Add "provide" option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6253 (4409d)
-
browser: Recommend using vitest-browser-vue, vitest-browser-svelte or vitest-browser-react with built-in locators instead of
@testing-library/framework
packages (d79511)- Using built-in locators solves several issues we encountered after the Browser Mode rewrite in Vitest 2:
- They support Shadow DOM unlike
testing-library
that relies solely onquerySelector
andclosest
- Having a single query mechanism between all frameworks and providers allows us to give users easy-to-understand examples which makes documenting it much easier
- All locators have the retry-ability mechanism built-in when using
.click
/.fill
and otheruserEvent
methods - Locators use Playwright implementation which allows us to reuse established selectors from Playwright ecosystem
🐞 Bug Fixes
-
browser:
- Produce valid config file if preview provider is used - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6305 (7f0ae)
-
coverage:
- Warn if
vitest
and@vitest/*
versions don't match - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6317 (e662c) - V8 to support source maps with multiple sources - by @AriPerkkio and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6120 (1f6cb)
- V8 to warn instead of crash when conversion fails - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6318 (91dea)
- Warn if
-
vitest:
- Add more type guards for --merge-reports - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6307 (0a5d8)