vitest-dev/vitest
### [`v0.25.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.1)
[Compare Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)
##### 🚀 Features
- Add `vi.setConfig` helper - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2293](https://togithub.com/vitest-dev/vitest/issues/2293)
- Allow hooks to be executed in a stack or list - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2294](https://togithub.com/vitest-dev/vitest/issues/2294)
##### 🐞 Bug Fixes
- Always rewrite defined jsdom keys - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2290](https://togithub.com/vitest-dev/vitest/issues/2290)
- Default reporter regression - by [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2292](https://togithub.com/vitest-dev/vitest/issues/2292)
- Don't fail `bench` when using options - by [@poyoho](https://togithub.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2295](https://togithub.com/vitest-dev/vitest/issues/2295)
##### [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1)
### [`v0.25.0`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.0)
[Compare Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)
##### ✅ Builtin TypeChecking
In v0.25.0, Vitest allows you to write tests for your types, using `expectTypeOf` or `assertType` syntaxes. By default all tests inside `*.test-d.ts` files are considered type tests. Run `vitest typecheck` to run type tests.
```ts
// my.test-d.ts
import { assertType, expectTypeOf } from 'vitest'
import { mount } from './mount.js'
test('my types work properly', () => {
expectTypeOf(mount).toBeFunction()
expectTypeOf(mount).parameter(0).toMatchTypeOf<{ name: string }>()
// @ts-expect-error name is a string
assertType(mount({ name: 42 }))
})
```
Learn more at [the documentation](https://vitest.dev/guide/testing-types.html) and this [RFC](https://togithub.com/vitest-dev/vitest/issues/1954)
##### 🚨 Breaking Changes
- Return context in `startVitest()` - by [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2072](https://togithub.com/vitest-dev/vitest/issues/2072)
##### 🚀 Features
- `onTestFailed` hook - by [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2210](https://togithub.com/vitest-dev/vitest/issues/2210)
- Display error frame if present (like Vite) - by [@haikyuu](https://togithub.com/haikyuu) and [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2257](https://togithub.com/vitest-dev/vitest/issues/2257)
- Benchmark table report - by [@poyoho](https://togithub.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2179](https://togithub.com/vitest-dev/vitest/issues/2179)
- Add typechecking functionality - by [@sheremet-va](https://togithub.com/sheremet-va) and [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2107](https://togithub.com/vitest-dev/vitest/issues/2107)
##### 🐞 Bug Fixes
- Clear full screen only in watch mode - by [@sheremet-va](https://togithub.com/sheremet-va) [(c3d89)](https://togithub.com/vitest-dev/vitest/commit/c3d89504)
- Don't serialize symbols and immutables - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2266](https://togithub.com/vitest-dev/vitest/issues/2266)
- Use --conditions instead of -C - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2267](https://togithub.com/vitest-dev/vitest/issues/2267)
- Show correct stack trace in errors and console - by [@sheremet-va](https://togithub.com/sheremet-va) and [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2248](https://togithub.com/vitest-dev/vitest/issues/2248)
- Align `.each` behavior with jest - by [@bartoszgolebiowski](https://togithub.com/bartoszgolebiowski) and [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2064](https://togithub.com/vitest-dev/vitest/issues/2064)
- Remove undefined values in options - by [@g4rry420](https://togithub.com/g4rry420) and [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2281](https://togithub.com/vitest-dev/vitest/issues/2281)
- **coverage**: Istanbul provider to preserve implicit else - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/2275](https://togithub.com/vitest-dev/vitest/issues/2275)
##### [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^0.24.3
->^0.25.0
^0.24.0
->^0.25.0
Release Notes
vitest-dev/vitest
### [`v0.25.1`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.1) [Compare Source](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1) ##### 🚀 Features - Add `vi.setConfig` helper - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2293](https://togithub.com/vitest-dev/vitest/issues/2293) - Allow hooks to be executed in a stack or list - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2294](https://togithub.com/vitest-dev/vitest/issues/2294) ##### 🐞 Bug Fixes - Always rewrite defined jsdom keys - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2290](https://togithub.com/vitest-dev/vitest/issues/2290) - Default reporter regression - by [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2292](https://togithub.com/vitest-dev/vitest/issues/2292) - Don't fail `bench` when using options - by [@poyoho](https://togithub.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2295](https://togithub.com/vitest-dev/vitest/issues/2295) ##### [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.25.0...v0.25.1) ### [`v0.25.0`](https://togithub.com/vitest-dev/vitest/releases/tag/v0.25.0) [Compare Source](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0) ##### ✅ Builtin TypeChecking In v0.25.0, Vitest allows you to write tests for your types, using `expectTypeOf` or `assertType` syntaxes. By default all tests inside `*.test-d.ts` files are considered type tests. Run `vitest typecheck` to run type tests. ```ts // my.test-d.ts import { assertType, expectTypeOf } from 'vitest' import { mount } from './mount.js' test('my types work properly', () => { expectTypeOf(mount).toBeFunction() expectTypeOf(mount).parameter(0).toMatchTypeOf<{ name: string }>() // @ts-expect-error name is a string assertType(mount({ name: 42 })) }) ``` Learn more at [the documentation](https://vitest.dev/guide/testing-types.html) and this [RFC](https://togithub.com/vitest-dev/vitest/issues/1954) ##### 🚨 Breaking Changes - Return context in `startVitest()` - by [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2072](https://togithub.com/vitest-dev/vitest/issues/2072) ##### 🚀 Features - `onTestFailed` hook - by [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2210](https://togithub.com/vitest-dev/vitest/issues/2210) - Display error frame if present (like Vite) - by [@haikyuu](https://togithub.com/haikyuu) and [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2257](https://togithub.com/vitest-dev/vitest/issues/2257) - Benchmark table report - by [@poyoho](https://togithub.com/poyoho) in [https://github.com/vitest-dev/vitest/issues/2179](https://togithub.com/vitest-dev/vitest/issues/2179) - Add typechecking functionality - by [@sheremet-va](https://togithub.com/sheremet-va) and [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2107](https://togithub.com/vitest-dev/vitest/issues/2107) ##### 🐞 Bug Fixes - Clear full screen only in watch mode - by [@sheremet-va](https://togithub.com/sheremet-va) [(c3d89)](https://togithub.com/vitest-dev/vitest/commit/c3d89504) - Don't serialize symbols and immutables - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2266](https://togithub.com/vitest-dev/vitest/issues/2266) - Use --conditions instead of -C - by [@sheremet-va](https://togithub.com/sheremet-va) in [https://github.com/vitest-dev/vitest/issues/2267](https://togithub.com/vitest-dev/vitest/issues/2267) - Show correct stack trace in errors and console - by [@sheremet-va](https://togithub.com/sheremet-va) and [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2248](https://togithub.com/vitest-dev/vitest/issues/2248) - Align `.each` behavior with jest - by [@bartoszgolebiowski](https://togithub.com/bartoszgolebiowski) and [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2064](https://togithub.com/vitest-dev/vitest/issues/2064) - Remove undefined values in options - by [@g4rry420](https://togithub.com/g4rry420) and [@antfu](https://togithub.com/antfu) in [https://github.com/vitest-dev/vitest/issues/2281](https://togithub.com/vitest-dev/vitest/issues/2281) - **coverage**: Istanbul provider to preserve implicit else - by [@AriPerkkio](https://togithub.com/AriPerkkio) in [https://github.com/vitest-dev/vitest/issues/2275](https://togithub.com/vitest-dev/vitest/issues/2275) ##### [View changes on GitHub](https://togithub.com/vitest-dev/vitest/compare/v0.24.5...v0.25.0)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.