Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
v1.5.3
🐞 Bug Fixes
- Use package.json name for a workspace project if not provided - by @sheremet-va in #5608 (48fba)
- Backport jest iterable equality within object - by @sukovanej in #5621 (30e5d)
- browser: Support benchmark - by @hi-ogawa in #5622 (becab)
- reporter: Use default error formatter for JUnit - by @hi-ogawa in #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 #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 #5544 (413ec)
- Fix default
import.meta.env.PROD: false
- by @hi-ogawa in #5561 (9c649) - Resolve cwd correctly when initiating projects - by @sheremet-va in #5582 (ec9d7)
- Always run
onTestFinished
in reverse order - by @sheremet-va in #5598 (23f29) - browser:
- coverage:
- Fix bundling of
v8-to-istanbul
- by @AriPerkkio in #5549 (df6a4) - Prevent crash when
cleanOnRerun
is disabled - by @AriPerkkio in #5540 (ea3c1) thresholds
to compare files relative to root - by @AriPerkkio in #5574 (80265)
- Fix bundling of
- expect:
- vitest:
- Fix false positive file filter match with leading slash - by @hi-ogawa in #5578 (316eb)
- Watch the output directory correctly - by @sheremet-va in #5584 (e40f9)
- StubEnv casts boolean on PROD/SSR/DEV - by @sheremet-va in #5590 (4da88)
View changes on GitHub
v1.5.0
🚀 Features
- Add configuration for diff truncation - by @willieho in #5073 and #5333 (6797b)
- Remove unrelated noise from diff for toMatchObject() - by @geersch in #5364 (99276)
- Allow custom host for --inspect and --inspect-brk - by @sheremet-va in #5509 (61572)
- coverage: V8 to ignore empty lines, comments, types - by @AriPerkkio in #5457 (10b89)
🐞 Bug Fixes
describe
calls not taking generic type parameters - by @aryaemami59 in #5415 (16bac)- Prevent hang when
process
is mocked - by @AriPerkkio in #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 #5428 (67485)
- Increase stack trace limit for location, don't hardcode suite position - by @sheremet-va in #5518 (04b23)
- benchmark:
- expect:
- types:
- Pass correct type for suite factory - by @sheremet-va in #5437 (26718)
- utils:
- vite-node:
- vitest:
- Correctly send console events when state changes - by @sheremet-va (3463f)
- Initiate FakeTimers on demand - by @sheremet-va in #5450 (e4e93)
- Check unhighlighted code for code frame line limit - by @hi-ogawa in #5465 (6ae7e)
- Correctly filter by parent folder - by @sheremet-va in #5408 (91b06)
- Close inspector immediately if run is canceled - by @sheremet-va in #5519 (b8006)
- workspace:
- Set CWD to config directory, allow overriding local .env - by @sheremet-va in #5476 (d4003)
View changes on GitHub
v1.4.0
🚀 Features
- Throw error when using snapshot assertion with
not
- by @fenghan34 in #5294 (b9d37) - Add a flag to include test location in tasks - by @sheremet-va in #5342 (d627e)
- cli:
- Support wildcards in
--project
option - by @fenghan34 in #5295 (201bd)
- Support wildcards in
- config:
- Add
shuffle.files
andshuffle.tests
options - by @fenghan34 in #5281 (356db) - Deprecate
cache.dir
option - by @fenghan34 in #5229 (d7e8b)
- Add
- coverage:
- Support
--changed
option - by @AriPerkkio in #5314 (600b4)
- Support
- vitest:
🐞 Bug Fixes
- Repeatable
--project
option - by @fenghan34 in #5265 (d1a06) --inspect-brk
to pause before execution - by @AriPerkkio in #5355 (e77c5)- Correct locations in test.each tasks - by @sheremet-va (4f6e3)
- api:
- Use resolvedUrls from devserver - by @saitonakamura and @hi-ogawa in #5289 (2fef5)
- browser:
- coverage:
- Expensive regexp hangs v8 report generation - by @AriPerkkio in #5259 (d68a7)
- V8 to ignore type-only files - by @AriPerkkio in #5328 (c3eb8)
- Respect source maps of pre-transpiled sources - by @AriPerkkio in #5367 (6eda4)
- Prevent
reportsDirectory
from removing user's project - by @AriPerkkio in #5376 (07ec3)
- expect:
- forks:
- Wrap
defines
to supportundefined
values - by @AriPerkkio in #5284 (5b58b)
- Wrap
- typecheck:
- ui:
- vitest:
- Loosen
onConsoleLog
return type - by @hi-ogawa in #5337 (6d1b1) - Ensure restoring terminal cursor on close - by @hi-ogawa in #5292 (0bea2)
- Ignore timeout on websocket reporter rpc - by @sheremet-va (38119)
- Correctly override api with --no-api flag - by @sheremet-va in #5386 (51d1d)
- Logs in
beforeAll
andafterAll
- by @fenghan34 in #5288 (ce5ca)
- Loosen
- workspace:
- Throw error when browser mode and
@vitest/coverage-v8
are used - by @AriPerkkio in #5250 (29f98)
- Throw error when browser mode and
View changes on GitHub
v1.3.1
🚀 Features
- vitest: Expose parseCLI method - by @sheremet-va in #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 #5235 (38155)
- coverage: Ignore generated TS decorators - by @AriPerkkio and @sheremet-va in #5206 (a2804)
- ui: Auto reload coverage iframe after test run - by @hi-ogawa in #5242 (5376d)
View changes on GitHub
v1.3.0
🚀 Features
- Deprecate watchExclude - by @patak-dev in #5171 (82885)
- browser:
- Run test files in isolated iframes - by @sheremet-va in #5036 (4f401)
- config:
- Add
snapshotSerializers
option - by @fenghan34 in #5092 (5b102)
- Add
- reporters:
- Support custom options - by @AriPerkkio in #5111 (fec9c)
- runner:
- Support automatic fixtures - by @fenghan34 and @sheremet-va in #5102 (0441f)
- ui:
- vitest:
- Add onTestFinished hook - by @sheremet-va in #5128 (6f5b4)
- Add github actions reporter - by @hi-ogawa in #5093 (40afb)
- Expose jsdom global if jsdom environment is enabled - by @sheremet-va in #5155 (567d2)
- Add new CLI options - by @sheremet-va in #5163 (4e179)
- "test" accepts options object as the second parameter - by @sheremet-va in #5142 (7d9b1)
- vm:
🐞 Bug Fixes
- Fix sourcemap in vm pools - by @hi-ogawa in #5063 (81105)
- Don't optimize react/jsx-runtime by default when running in Node - by @sheremet-va in #5079 (0d2bf)
- Rpc timeout error messages to include caller - by @AriPerkkio in #5103 (a6e04)
- Requires fixed version across the monorepo - by @antfu in #5208 (68f51)
- Prevent merging of
poolOptions
- by @penalosa in #5221 (bc5b2) - browser:
- Don't exclude node builtins from optimization - by @sheremet-va in #5082 (714c9)
- Support
coverage.reportsDirectory
with multiple directories - by @AriPerkkio in #5056 (ae73f)
- cli:
- Parse
--browser=<name>
correctly - by @AriPerkkio in #5179 (656e2)
- Parse
- coverage:
.tmp
directory conflicts with--shard
option - by @AriPerkkio in #5184 (5749d)
- deps:
- reporters:
- Testsuite name should include project root in Junit output - by @fenghan34 in #5116 (2494f)
- typecheck:
- ui:
- Fix tests duration time - by @vovsemenv in #5219 (58103)
- utils:
- vitest:
- Correctly report failed test files as failures in json reporter, export json reporter types - by @sheremet-va in #5081 (0417b)
- Don't run typecheck tests in browser if both are enabled - by @sheremet-va in #5080 (1045b)
- Handle function config inside
defineWorkspace
- by @hi-ogawa in #5089 (0bf52) - Remove excessive listeners when running without isolation, don't reset the state - by @sheremet-va in #5132 (b607f)
- Auto-enable "github-actions" only where users didn't configure reporters - by @hi-ogawa in #5158 (ef044)
- Support more array cli options - by @hi-ogawa in #5162 (3afe6)
- Add types for the new global
jsdom
variable - by @sheremet-va in #5164 (0f898) - Expose onTestFinished globally - by @sheremet-va (1304f)
- Disable optimizer by default until it's stable - by @sheremet-va in #5156 (e1bd8)
- Delegate snapshot options to workspace from root config - by @hi-ogawa in #5199 (86297)
- Fix
optimizeDeps.disabled
warnings on Vite 5.1 - by @hi-ogawa in #5215 (1aecd)
- vm:
View changes on GitHub
v1.2.2
🐞 Bug Fixes
- coverage:
- Remove
coverage/.tmp
files after run - by @AriPerkkio in #5008 (d53b8) - Don't crash when re-run removes earlier run's reports - by @AriPerkkio in #5022 (66898)
- Remove
- expect:
- forks:
- Set correct
VITEST_POOL_ID
- by @AriPerkkio in #5002 (7d0a4)
- Set correct
- threads:
- Mention common work-around for the logged error - by @AriPerkkio in #5024 (915d6)
- typecheck:
- vite-node:
- Provide import.meta.filename and dirname - by @sheremet-va in #5011 (73148)
- vitest:
- Expose getHooks & setHooks - by @adriencaccia in #5032 (73448)
- Test deep dependencies change detection - by @blake-newman in #4934 (9c7c0)
- Throw an error if vi.mock is exported - by @sheremet-va in #5034 (253df)
- Allow
useFakeTimers
to fakerequestIdleCallback
on non browser - by @hi-ogawa in #5028 (a9a48) - Support older NodeJS with async
import.meta.resolve
- by @AriPerkkio in #5045 (cf564) - Don't throw an error if mocked file was already imported - by @sheremet-va in #5050 (fff1a)
View changes on GitHub
v1.2.1
🐞 Bug Fixes
- browser:
- coverage:
thresholds.autoUpdate
to work with arrow function configuration files - by @AriPerkkio in #4959 (4b411)
- expect:
- Implement chai inspect for
AsymmetricMatcher
- by @hi-ogawa and @sheremet-va in #4942 (06bae)
- Implement chai inspect for
- vite-node:
- vitest:
- Handle single
await vi.hoisted
- by @hi-ogawa in #4962 (dcf2e) - Simplify hoist transform check regex to avoid expensive regex match - by @hi-ogawa in #4974 (df0db)
- Correctly find module if it has a version query - by @sheremet-va in #4976 (952c3)
- Check color support for intercepted console logging - by @hi-ogawa in #4966 (39a71)
- Use development/production conditions when resolving external modules - by @sheremet-va in #4980 (8877e)
- Throw a syntax error if vi.hoisted is directly exported - by @sheremet-va in #4969 (f8bff)
- Handle single
View changes on GitHub
v1.2.0
🚀 Features
- Support case-insensitive path matching in cli - by @tigranmk in #3567 and #4911 (1326c)
- Add typeahead search - by @bonyuta0204 and @sheremet-va in #4275 and #4733 (480d8)
- Add syntax highlighting to error messages - by @sheremet-va in #4813 (8c969)
- Allow extending toEqual - by @tigranmk and @sheremet-va in #2875 and #4880 (463be)
- coverage:
- Custom reporter support - by @AriPerkkio in #4828 (96dc6)
- ui:
- Show unhandled errors on the ui - by @spiroka and @sheremet-va in #4380 (7f59a)
- vitest:
🐞 Bug Fixes
- browser:
- happy-dom:
- Window.close() for environment teardown - by @capricorn86 in #4931 (91719)
- utils:
- vitest:
- Fix tap reporter to handle custom error - by @hi-ogawa in #4897 (f8ba8)
- Gracefully exit Vitest if
process.exit
is called inside the test - by @sheremet-va in #4903 (8e6c1) - Throw "cannot mock" error only in isolated pools - by @sheremet-va in #4905 (f99cc)
- Don't throw SyntaxError when "await vi.hoisted" is used - by @sheremet-va in #4915 (ca62f)
- Correctly parse --maxWorkers/--minWorkers - by @sheremet-va in #4924 (0e77e)
- Show correct error when vi.hoisted is used inside vi.mock and the other way around - by @sheremet-va in #4916 (c4eac)
- Call global teardown when using workspaces - by @sheremet-va in #4935 (528bd)
- Use file instead of id for HMR - by @sheremet-va in #4938 (ca76f)
- Add inlined deps to ssr.noExternal so they are added to the module graph - by @sheremet-va in #4945 (1663f)
- workspace:
- Support overring
pool
andpoolOptions
on project level - by @AriPerkkio in #4765 (e9fe4)
- Support overring