Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
v1.1.3
v1.1.2
🐞 Bug Fixes
- Remove internal flag from UI option in the config - by @sheremet-va (7b4a2)
- browser:
- Avoid safaridriver collision - by @mbland in #4863 (345a2)
- Resolved failure to find arbitrarily-named snapshot files when using
expect(...).toMatchFileSnapshot()
matcher. - by @zmullett, Zac Mullett and @sheremet-va in #4839 (b8140) - Handle config.base - by @mbland and @sheremet-va in #4686 and #4692 (9e345)
- deps:
- runner:
- spy:
- Don't allow
Promise
inmockImplementation
if it's not in the function signature - by @sheremet-va in #4859 (072e0)
- Don't allow
- vite-node:
- Correctly return cached result - by @sheremet-va in #4870 (15bbb)
- vitest:
- Throw an error if mock was already loaded when
vi.mock
is called - by @sheremet-va in #4862 (e12a5) - Correctly rerun test files on change if server was restarted - by @sheremet-va in #4871 (6088b)
- Throw an error if mock was already loaded when
- vm-threads:
- Don't crash on percentage based
memoryLimit
- by @inottn and @AriPerkkio in #4802 (70e8a)
- Don't crash on percentage based
View changes on GitHub
v1.1.1
🐞 Bug Fixes
- Don't crash when using happy-dom or jsdom environment on Yarn PnP workspaces - by @wojtekmaj and @sheremet-va in #4698 (ee8b4)
- Don't fail if
inline: true
is set - by @sheremet-va in #4815 (8f622) - Correct option name
--no-parallelism
- by @bonyuta0204 in #4831 (5053a) - Match jest json output by making json reporter output ndjson-compatible - by @bard in #4824 (7e6a6)
- runner:
- vitest:
- Don't hang when mocking files with cyclic dependencies - by @sheremet-va in #4811 (e8ca6)
- Initialize snapshot state only once for each file suite - by @hi-ogawa in #4796 (957da)
- Fix file snapshots in skipped suites considered obsolete - by @hi-ogawa in #4795 (06c14)
- Show
beforeAll/afterAll
errors in junit reporter - by @hi-ogawa in #4819 (2baea)
- vm-threads:
- Tests not cancelled on key press, cancelled tests shown twice - by @AriPerkkio in #4781 (cf53d)
View changes on GitHub
v1.1.0
🚀 Features
- Add es-main compatibility to vite-node - by @zookatron in #4751 (486a3)
- Add
--workspace
option, fix root resolution in workspaces - by @sheremet-va and @AriPerkkio in #4773 (67d93) - Add
--no-file-parallelism
,--maxWorkers
,--minWorkers
flags - by @sheremet-va and @AriPerkkio in #4705 (fd5d7) - Add
--no-isolate
flag to improve performance, add documentation about performance - by @sheremet-va, @AriPerkkio and Pascal Jufer in #4777 (4d55a) - Add
--exclude
CLI flag - by @Namchee and @sheremet-va in #4279 (f859e)
🐞 Bug Fixes
- Correctly reset provided values - by @sheremet-va in #4775 (5a71e)
- expect:
- runner:
- types:
defineWorkspace
fix intellisense and report type errors - by @AriPerkkio in #4743 (9cc36)
- ui:
- vitest:
- Pass down CLI options to override workspace configs - by @sheremet-va in #4774 (8dabe)
View changes on GitHub
v1.0.4
The previous release was built incorrectly and didn't include the performance fix. This release fixes that.
🐞 Bug Fixes
- cli:
--coverage.all=false
resolved incorrectly - by @AriPerkkio in #4697 (a7931)
🏎 Performance
- reporters: Downgrade
log-update
to v5 - by @AriPerkkio in #4711 (13ff9)
View changes on GitHub
v1.0.3
🐞 Bug Fixes
- Correct package exports - by @userquin in #4707 (37388)
- runner: Fix async fixture teardown - by @hi-ogawa in #4700 (92afd)
- vitest: Correctly filter changed files when Vitest workspace is used - by @sheremet-va in #4693 (34135)
🏎 Performance
- reporters: Downgrade
log-update
to v5 - by @AriPerkkio in #4711 (13ff9)
View changes on GitHub
v1.0.2
🐞 Bug Fixes
- Don't check if vite is installed - by @wojtekmaj in #4659 (775e2)
- Fix ensurePackageInstalled on Yarn PnP - by @wojtekmaj in #4657 (574cc)
- Apply
stripSnapshotIndentation
for thrown snapshot - by @hi-ogawa in #4663 (74820) - cli:
- Prompted packages fail to install - by @AriPerkkio in #4593 (a9908)
- expect:
- runner:
- vitest:
View changes on GitHub
v1.0.1
🐞 Bug Fixes
- Bump vitest packages
peerDependencies
versions - by @AriPerkkio in #4654 (42070)
View changes on GitHub
v1.0.0
Vitest 1.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
- Add support for
pool
andpoolOptions
, remove old flags - by @AriPerkkio in #4172 (114a9) - Support multiple parallel
child_process
- by @AriPerkkio in #3925 (8b4a4) - Make snapshots more visually pleasing by @sheremet-va in #3961
- Set
vitest
peer dependency range for sub packages - by @AriPerkkio in #4299 (cd03c) - Bump minimum node version to 18 and match Vite 5 requirement - by @ghiscoding in #4296 (263b7)
- Remove deprecated node loader - by @sheremet-va in #4371 (29299)
- Move browser providers to @vitest/browser package - by @sheremet-va in #4364 (5cdeb)
- Remove EnhancedSpy type, deprecate SpyInstance, improve mocks and vi documentation - by @sheremet-va and @dammy001 in #4400 (d40b3)
expect().toContain()
can handle classList, Node.contains, and any array-like structure. This means you cannot use it to check if one object is a subset of another - useexpect().toMatchObject()
in that case - by @sheremet-va in #4239 (ce84f)- runner: Correctly process custom tasks, update runner hooks naming by @sheremet-va in #4076
- coverage:
- glob based coverage thresholds by @AriPerkkio in #4442 (18300)
- Use
transformMode
and workspace project based source maps - by @AriPerkkio in #4309 (28109cc) - Enable
coverage.all
by default - by @AriPerkkio in #4265 (5a741)
🚀 Features
- Add Marko example and include code coverage for Marko files - by @DylanPiercey in #4263 (eac77)
- Update magic-string - by @bluwy in #4345 (fde18)
- Implement provide/inject API to transfer data from the main thread - by @sheremet-va in #4422 (a7522)
- Improve expectTypeOf error messages - by @mmkal, Misha Kaletsky and @sheremet-va in #4206 (18300)
- Add test.sequential() api - by @dsyddall in #4512 (c3619)
- Allow custom pools - by @sheremet-va in #4417 (a3fd5)
- Add --project option to limit what projects are running - by @sheremet-va, @dammy001 and @AriPerkkio in #4561 (58ef5)
- benchmark:
- browser:
- Support "none" provider and update lit example to use it - by @sheremet-va in #4427 (d03a2)
- coverage:
- Support
/* v8 ignore...
ignore hints - by @AriPerkkio in #4573 (f9e4a)
- Support
- expect:
- Support
expect.closeTo
api - by @Dunqing and golebiowskib in #4260 (7f91c) - Compare URL objects by href - by @kleinfreund and @AriPerkkio in #4615 (f7a73)
- Support
- snapshot:
- vite-node:
- vitest:
- Expose getBenchFn, getBenchOptions - by @sheremet-va in #4208 (8e5e4)
- Run typecheck during tests - by @sheremet-va in #4324 (a1aad)
- Filter stacktraces - by @clarkf in #1999 and #4338 (6b734)
- Expose execArgv to the different pools - by @adriencaccia in #4383 (9021e)
🐞 Bug Fixes
- Add multiple globals in VM+JSDOM - by @nstepien in #4199 and #4202 (fc947)
- Ignore "plugins" field in snapshotFormat option - by @sheremet-va in #4204 (db1ff)
nextTick
mocking error message to mention correct config option - by @AriPerkkio in #4215 (98fe3)- Export VitestUtils interface - by @fbritoferreira in #4301 (b1439)
- Assertion diff message handle non-writable sub-properties - by @bfamchon in #4278 (7e1a0)
- Don't bundle import from rollup - by @sheremet-va in #4392 (3b584)
- Support accessing fixture at same index of dependency fixture - by @dsyddall in #4387 (4cd1d)
- Make asynchronous fixtures work concurrently - by @dsyddall in #4403 (3c9f9)
- Coverage.100 crash when using as an cli argument - by @marcelobotega in #4346 (0db38)
- Support typechecking with Yarn PnP - by @sheremet-va in #4412 (1ecbe)
- Support accessing task from test context without accessing fixtures - by @dsyddall in #4419 (3397f)
- Copy custom asymmetric matchers to local
expect
- by @hi-ogawa in #4405 (9fe38) - Apply serializer to
Error
instance for thrown snapshot - by @hi-ogawa and @sheremet-va in #4396 (ac309) - Throw an error when running "vitest typecheck" - by @sheremet-va in #4439 (7f502)
- Don't expand snaps...
v1.0.0-beta.6
🚀 Features
- Add --project option to limit what projects are running - by @sheremet-va, Anjorin Damilare and @AriPerkkio in #4561 (58ef5)
- coverage: Support
/* v8 ignore...
ignore hints - by @AriPerkkio in #4573 (f9e4a)
🐞 Bug Fixes
- Respect trailing slash when filtering by file path - by @ibuibu in #4538 (f377a)
- Date prototype when using setSystemTime - by @spiroka in #4584 (3f8c3)
- bench:
- browser:
- deps:
- runner:
- vitest:
- Improve vi.waitUntil type to excude falsy types - by @sheremet-va in #4572 (23652)
- Add import-meta.d.ts - by @macdaddyaz in #4571 (dd802)
- Correctly support CSS variable when using happy-dom - by @sheremet-va in #4601 (9fbf3)
- Pass correct server options in workspace - by @hironytic in #4539 and #4540 (241a8)
🏎 Performance
- coverage-istanbul:
all: true
instruments already instrumented files - by @AriPerkkio in #4552 (d1e1b)