Update dependency vitest to v2 - autoclosed
This MR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| vitest (source) | devDependencies | major | ^0.34.6 -> ^2.0.0 |
Release Notes
vitest-dev/vitest (vitest)
v2.1.8
🐞 Bug Fixes
- Support Node 21 - by @sheremet-va (92f7a)
View changes on GitHub
v2.1.7
🐞 Bug Fixes
- Revert support for Vite 6 - by @sheremet-va (fbe5c)
- This introduced some breaking changes (https://github.com/vitest-dev/vitest/issues/6992). We will enable support for it later. In the meantime, you can still use
pnpm.overridesor yarn resolutions to override theviteversion in thevitestpackage - the APIs are compatible.
- This introduced some breaking changes (https://github.com/vitest-dev/vitest/issues/6992). We will enable support for it later. In the meantime, you can still use
View changes on GitHub
v2.1.6
🚀 Features
- Support Vite 6
View changes on GitHub
v2.1.5
🐞 Bug Fixes
-
dangerouslyIgnoreUnhandledErrorswithout base reporter - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6808 (0bf0a) - Capture
unhandledRejectioneven when base reporter is not used - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6812 (8878b) - Don't change the working directory when loading workspace projects - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6811 (f0aea)
- Remove
sequence.concurrentfrom theRuntimeConfigtype - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6880 (6af73) - Stop the runner before restarting, restart on workspace config change - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6859 (b01df)
- Don't rerun on Esc or Ctrl-C during watch filter - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6895 (98f76)
- Print ssrTransform error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6885 (4c96c)
- Throw an error and a warning if
.poll,.element,.rejects/.resolves, andlocator.*weren't awaited - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6877 (93b67) -
browser:
- Don't process the default css styles - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6861 (0d67f)
- Support non US key input - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6873 (5969d)
- Stop the browser rpc when the pool is closed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6858 (9a0c9)
- Init browsers eagerly when tests are running - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6876 (417bd)
-
coverage:
- Report uncovered files when re-run by
enteror'a'- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6848 (487c8)
- Report uncovered files when re-run by
-
ui:
- Remove crossorigin attributes for same origin assets - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6883 (6e793)
-
vite-node:
- Improve esm check to decide external - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6816 (7e1fa)
- Top-level throw in module is not reported properly - by @vanaigr and @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6840 (cf0cb)
-
vitest:
- Use fetch() implementation from happy-dom - by @capricorn86 in https://github.com/vitest-dev/vitest/issues/6879 (3c56f)
🏎️ Performance
- Limit workspace project concurrency to available cores - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6869 (f4c04)
View changes on GitHub
v2.1.4
🚀 Features
This patch release includes a non-breaking feature for the experimental Browser Mode that doesn't follow SemVer. If you want to avoid picking up releases like this, make sure to pin the Vitest version in your package.json. See npm's documentation about semver for more information.
-
browser: Allow custom HTML path, respect plugins
transformIndexHtml- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6725 (16902)
🐞 Bug Fixes
-
windows:
- Don't normalize drive case letter in root - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6792 (b28cd)
-
browser:
- Fix default browser port - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6700 (9c518)
- Optimize expect-type - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6713 (07918)
- Don't polyfill process.env - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6718 (da6d2)
- Increment browser port automatically if there are several projects with browser.enabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6717 (a9397)
- Cleanup keyboard state - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6731 (19278)
- Don't add
v=queries to setup files imports - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6759 (b8258) - User event cleanup on retry - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6764 (bdd15)
- Ignore non mocked msw requests - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6770 (9d9ba)
- Initiate MSW in the same frame as tests - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6772 (2444f)
-
deps:
- Update dependency sirv to v3 - in https://github.com/vitest-dev/vitest/issues/6701 (fde5d)
-
expect:
- Correct behavior of
toThrowErrorwith empty string parameter - by @shulaoda in https://github.com/vitest-dev/vitest/issues/6710 (a6129)
- Correct behavior of
-
mocker:
- Remove spy from peer dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6777 (3a8b5)
-
vitest:
- Clarify slowTestThreshold, print slow tests in non-TTY mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6715 (2e6aa)
- Print warnings form Vite plugins - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6724 (121b1)
- Don't fail if the working directory starts with a lowercase drive letter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6779 (df6d7)
- Silence import analysis warning - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6785 (39041)
-
vitest,runner:
- Simplify
test.extendtype exports - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6707 (e5c38)
- Simplify
🏎️ Performance
- Use
hashto replacecreateHash- by @btea in https://github.com/vitest-dev/vitest/issues/6703 (5d07b)
View changes on GitHub
v2.1.3
🐞 Bug Fixes
- Fix error diff of
toBeNaN, toBeUndefined, toBeNull, toBeTruthy, toBeFalsy- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6697 (e0027) -
browser:
- Provide aria role intellisense - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6629 (f36ea)
- Not.toBeInTheDocument works with locators API - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6634 (8bef5)
- Use
/mockServiceWorker.jsinstead of/__vitest_msw__- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6687 (4b2ce) - Don't override the esbuild option in the browser mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6692 (d131f)
-
expect:
- Preserve prototype in
toMatchObjectdiff - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6620 (d289e)
- Preserve prototype in
-
mocker:
- Specify correct spy dependency - by @sheremet-va (7e958)
-
runner:
- Ensure sequential suite overrides sequence.concurrent - by @dsyddall and @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6653 (5e6de)
-
vitest:
- Deprecate UserConfig in favor of ViteUserConfig - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6626 (496bd)
- Don't hang with maxConcurrency 0 - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6627 (946d8)
- Deprecate old task types and node-reliant types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6632 (00045)
- Fix
<empty line>logs when interleavingconsole.log/error- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6644 (9ece3) - Show rollup error details as test error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6686 (47dde)
- Always inline setup files - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6689 (19d64)
- Use
fast-globinstead oftinyglobbyin Vitest - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6688 (70baa)
-
web-worker:
- Share mocker with main executor - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6623 (fe7b8)
🏎️ Performance
- Reuse full name in reported tasks, update generator types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6666 (7a0de)
View changes on GitHub
v2.1.2
🐞 Bug Fixes
- Move
Vitest.setServerto postconfigureServerhook to enable import analysis for workspace config loading - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6584 (e7f35) -
benchmark:
- Clear
BenchmarkResult.samplesarray to reduce memory usage - by @hi-ogawa and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6541 (a6407)
- Clear
-
browser:
- Fix dynamic import inside worker - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6569 (ea2d4)
- Fix browser mock factory event race condition - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6530 (f131f)
- Serve ui assets as static - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6564 (adcda)
- Update solidjs testing library lib - by @CamilleTeruel in https://github.com/vitest-dev/vitest/issues/6548 (91442)
- Use
data:protocol on preview provider file upload - by @userquin in https://github.com/vitest-dev/vitest/issues/6501 (e9821) - Fix base for client script - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6510 (f9528)
- Throw an error if "@vitest/browser/context" is imported outside of the browser mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6570 (383f1)
-
coverage:
- Remove empty coverage folder on test failure too - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6547 (1371c)
- Include
*.astroby default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6565 (f8ff7) -
cleanOnRerun: falseto invalidate previous results - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6592 (88bde)
-
expect:
- Fix
toBeDefinedwithexpect.poll- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6562 (f7da6)
- Fix
-
forks:
- Fix
--cpu-profand--heap-profnot working by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/pull/6555 (2e4d894)
- Fix
-
runner:
- Mark tests as skipped when
beforeAllfailed - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6524 (fb797) - Support fixture parsing of lowered async syntax - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6531 (b553c)
- Fix fixture parsing of lowered async syntax for non arrow functions - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6575 (3de00)
- Guard test hook callback - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6604 (14971)
- Run
onTestFinishedandonTestFailedduringretryandrepeats- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6609 (c5e29)
- Mark tests as skipped when
-
ui:
- List tests on ui when
--standalone- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6577 (d0bf8)
- List tests on ui when
-
vite-node:
- Fix esm false-detection inside comment - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6506 (91f85)
-
vitest:
- Install dependencies with the same version when prompted - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6611 (ed8b7)
- Make env.SSR consistent between different pools - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6616 (8a8d3)
- Don't start a websocket server if api is disabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6617 (82140)
-
workspace:
- Fix glob pattern detection - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6502 (7727c)
- Ignore DS_Store by default - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6571 (d2a86)
View changes on GitHub
v2.1.1
🐞 Bug Fixes
-
browser:
- Make example test callbacks async - by @aqandrew in https://github.com/vitest-dev/vitest/issues/6484 (16aa7)
- Optimize vitest-browser-vue correctly - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6490 (5cbb0)
-
workspace:
- Resolve glob pattern once to avoid name collision - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6489 (36b5a)
View changes on GitHub
v2.1.0
This release makes another big change to the Browser Mode by introducing locators API:
test('renders blog posts', async () => {
const screen = page.render(<Blog />)
await expect.element(screen.getByRole('heading', { name: 'Blog' })).toBeInTheDocument()
const [firstPost] = screen.getByRole('listitem').all()
await firstPost.getByRole('button', { name: 'Delete' }).click()
expect(screen.getByRole('listitem').all()).toHaveLength(3)
})
You can use either vitest-browser-vue, vitest-browser-svelte or vitest-browser-react to render components and make assertions using locators. Locators are also available on the page object from @vitest/browser/context.
Potential Breaking Change
-
workspace:
- Correctly resolve workspace globs and file paths - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6316 (afdcb)
- This changes how the custom glob pattern in the workspace config is treated. Any file matching the glob is considered a Vitest config file. Any folder matching the glob pattern is treated as a workspace project and is subject to the regular config resolution (single
vitest.config.tsorvite.config.tsinside the folder) - For example,
projects/*will match anything inside theprojectsfolder. If it's a folder, we try to find the config inside that folder (if there is none, it is still treated as a project with the default config). If it's a file, it will be treated as a Vitest config.projects/**/*previously would assume that you only wanted to have folders as projects, but now it will match every single file insideprojects. - This change doesn't affect non-glob usage.
🚀 Features
-
api:
- Make spec into a class instead of a tuple - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6355 (874a1)
-
browser:
- Move page.config to server.config, add more docs - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6252 (af2b8)
- Make iframe scalable, improve documentation - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6257 (74ca1)
- Introduce built-in locators - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6084 (3347f)
- Support v8 coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6273 (34199)
- Support
userEvent.uploadin playwright provider - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6442 (cf148) - Support
--inspect- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6433 (0499a) - Support
--inspect-brk- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6434 (7ab0f)
-
cli:
- Extend existing list command to output only a list of file names - by @Ma-hawaj and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6392 (008f0)
-
coverage:
- Add
--exclude-after-remap- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6309 (5932a)
- Add
-
mocker:
- Introduce @vitest/mocker package, allow
{ spy: true }instead of a factory - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6289 (95f02)
- Introduce @vitest/mocker package, allow
-
vitest:
- Add "provide" option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6253 (4409d)
- Add return type and promisable mockFactory - by @syi0808 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6139 (f5e0b)
- Add
vi.advanceTimersToNextFrame- by @bnjm and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6347 (8ff63) - Allow env to be stubbed to undefined - by @JSanchezIO and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6359 (c3b27)
- Migrate from
fast-globtotinyglobby- by @SuperchupuDev in https://github.com/vitest-dev/vitest/pull/6274 (c321a)
🐞 Bug Fixes
- Correctly resolve nested mocks with
indexfile - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6266 (081cf) - Don't panic when coverage.reporter is a string - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6267 (7b37d)
- Align RawMatcherFn type definition with Jest - by @wheresrhys in https://github.com/vitest-dev/vitest/issues/6351 (d09f0)
- Cjs build of vite node server - by @AkaraChen in https://github.com/vitest-dev/vitest/issues/6389 (12e70)
- Allow inlining vite's cached dependencies - by @chriswheeldon-peakon in https://github.com/vitest-dev/vitest/issues/6284 (03208)
- Print unexpected error message if peer dependencies have a different version - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6446 (b992b)
- Ignore importer when resolving Vitest - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6469 (0b447)
-
expect.getState().testPathalways returns correct path - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6472 (ac698) - UserEvent works consistently between providers - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6480 (0b4da)
-
browser:
- Print correct stack trace for unhandled errors - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6134 (1da6c)
- Use documentElement as the root for selector - by @sheremet-va (d8077)
- Keep querying elements even if locator is created with elementLocator, add pubic @vitest/browser/utils - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6296 (30dc5)
- Produce valid config file if preview provider is used - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6305 (7f0ae)
- Correctly run in-source tests in the browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6440 (c8531)
- Exclude missed packages from optimization, print help message - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6445 (8d883)
- Define mocker as a dependency - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6476 (9560a)
-
coverage:
- Warn if
vitestand@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)
- Use project specific
vitenodefor uncovered files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6044 (da52d)
- Warn if
-
runner:
- Use
performance.nowinstead ofDate.nowfor duration - by @LuciNyan in https://github.com/vitest-dev/vitest/issues/6382 (fe489) - Async assertion auto await should timeout - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6391 (ad6e7)
- Use
-
snapshot:
- Reject multiple
toMatchInlineSnapshotupdates at the same location - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6332 (1606f) - Improve inline snapshot inside loop rejection - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6339 (e0368)
- Reject multiple
-
typecheck:
- Run both runtime and typecheck tests if
typecheck.includeoverlaps withinclude- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6256 (153ff)
- Run both runtime and typecheck tests if
-
types:
- Allow Callbacks Passed to before*/after* to Return Anything - by @LuciNyan in https://github.com/vitest-dev/vitest/issues/6393 (f6217)
-
ui:
- Remove "filters" flickering - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6463 (0223b)
- Render project name consistently - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6329 (94a18)
-
vite-node:
- Disable watcher if hmr is disabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6251 (c51c6)
- Fix watch on vite 6 - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6422 (c3ac4)
-
vitest:
- Update json reporter output - by @Emiyaaaaa in https://github.com/vitest-dev/vitest/issues/6064 (c9979)
- Add more type guards for --merge-reports - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6307 (0a5d8)
- Always resolve vitest to the root version - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6369 (163d7)
- Dispose vmForks listeners to avoid memory leak - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6448 (2673c)
View changes on GitHub
v2.0.5
🚀 Features
- Introduce experimental reported tasks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6149 (13d85)
- This is part of the experimental API and doesn't follow semver. We are hoping to stabilize it for 2.1. If you are working with custom reporters, give this a go!
🐞 Bug Fixes
- Show a difference between string characters if both values are strings - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6191 (29176)
-
testNamePatternadds leading space - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6186 (073a5) -
browser:
- Don't bundle
afterEachcleanup hooks in node entrypoint - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6192 (e6fbc) - UserEvent.setup initiates a separate state for userEvent instance - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6088 (883f3)
- Correctly import optimized module in vi.importActual - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6219 (804ff)
- Passing options to hover/unhover - by @MNeverOff in https://github.com/vitest-dev/vitest/issues/6175 (d4c00)
- Improve unique CSS selector generation - by @zacharyvoase and Zack Voase in https://github.com/vitest-dev/vitest/issues/6243 (e7acd)
- Don't bundle
-
vitest:
- Remove nuxt from auto inline deps - by @sheremet-va (93882)
- Improve
defineProjectanddefineWorkspacetypes - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6198 (8cd82) - Correctly resolve mocked
node:*imports in__mocks__folder - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6204 (a48be)
-
web-worker:
- Expose globals on self - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6170 (12bb5)
View changes on GitHub
v2.0.4
🐞 Bug Fixes
- One-line environment options - by @hahanein in https://github.com/vitest-dev/vitest/issues/5105 (38269)
- Resolve assets imported with
require- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6159 (807a2) -
browser:
- Don't panic if @vitest/browser is installed outside of project root - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6135 (ccfcd)
- Set global filepath - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6190 (0d0b4)
- Allow preview and open in the editor screenshot error from ui - by @userquin in https://github.com/vitest-dev/vitest/issues/6113 (2d620)
-
coverage:
- Global thresholds to include files from glob thresholds - by @thor-juhasz and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6172 (02e3f)
- Consistent type-only file handling - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6183 (90576)
- Ignore
*.ctsfiles - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6189 (5da45) - Add
thresholds.<glob>.100option - by @thor-juhasz and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6174 (f6845)
-
spy:
- Fix
mockImplementationfor function overload and unions - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6181 (7a75b)
- Fix
View changes on GitHub
v2.0.3
🚀 Features
- ui: Show all suites/tests when parent matches - by @userquin in https://github.com/vitest-dev/vitest/issues/6106 (840e0)
🐞 Bug Fixes
-
--inspect-brkstop on Windows - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6110 (f8519) -
browser:
- Don't import from "vite" - by @sheremet-va (35655)
- Allow immidiate reinvalidation of mocked dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6108 (f44cc)
-
spy:
- Fix type error when assigning
vi.spyOntoMockInstanceof function overload - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/6086 (e9f9a)
- Fix type error when assigning
-
vite-node:
- Remove suffix slash on file protocol for window - by @syi0808 in https://github.com/vitest-dev/vitest/issues/6109 (93ebd)
View changes on GitHub
v2.0.2
🐞 Bug Fixes
-
browser:
- Remove @vitest/runner > pretty-format from prebundling because it doesn't exist - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6075 (a169d)
- Inline pretty-format and replace picocolors with tinyrainbow - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6077 (80a43)
- Remove
crypto.randomUUIDfrom the client - by @userquin in https://github.com/vitest-dev/vitest/issues/6079 (04c83) - Correctly overwrite loupe require - by @sheremet-va (756ac)
- Dedupe @vitest/browser/client - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6081 (ee725)
- Don't release keyboard automatically - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6083 (58fac)
-
ui:
- Test files notified only when running - by @userquin in https://github.com/vitest-dev/vitest/issues/6069 (af7fe)
- Encode html entities in task name - by @userquin and @sheremet-va in https://github.com/vitest-dev/vitest/issues/6070 (7f0cc)
-
web-worker:
- Peer dependency version on
vitest- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6060 (95a2d)
- Peer dependency version on
🏎️ Performance
- browser: Don't import msw if no modules are mocked - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6073 (aa527)
View changes on GitHub
v2.0.1
🐞 Bug Fixes
- browser: Correctly inherit browser config in a workspace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6054 (4b03e)
- ui: Move virtual scroller to dev dependencies - by @userquin in https://github.com/vitest-dev/vitest/issues/6053 (f94ed)
- vitest: Print only running files, not every file - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6052 (4d559)
View changes on GitHub
v2.0.0
Vitest 2.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
- Simplify mock function generic types and align with jest - by @hi-ogawa in https://github.com/vitest-dev/vitest/pull/4784 (a0c1d37)
- Remove
--segfault-retry- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5514 (ed60e)- This flag was introduced to combat
threadssegfaults. Our current recommendation is to use the new defaultforkspool instead.
- This flag was introduced to combat
- Run suite hooks in a stack - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5609 (1277d)
- This feels like a more sensible default. Especially with the new
onTestFinishedhook. This can make your tests run a little bit slower.
- This feels like a more sensible default. Especially with the new
- Enable
coverage.ignoreEmptyLinesby default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5543 (31994)-
⚠️ This change may cause significant differences in your coverage results compared to Vitest v1. These changes are expected as coverage reporting is now more accurate. See https://github.com/vitest-dev/vitest/issues/5423 for more details.
-
- Add correct location and snapshot fields in json reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5434 (bcccc)
- Previously, the
locationfield pointed to the error location instead of the test location. Now it is aligned with jest and contains thelineandcolumnof a test function, but requiresincludeTaskLocationto be enabled.
- Previously, the
- Update dependency chai to v5 - by renovate[bot] and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5135 (73646)
- Remove watchExclude - by @patak-dev in https://github.com/vitest-dev/vitest/issues/5177 (d7371)
- Change default
poolto'forks'- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5047 (7f8f9)- This change is done for compatibility issues
- This pool may be slightly slower than previous
threadspool: https://vitest.dev/guide/improving-performance.html#pool
-
--merge-reportsto support coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5736 (b7438) - Add promise-based return assertions, do not auto-resolve returned promises - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5749 (5f710)
-
⚠️ Vitest no longer unwraps promises inspy.mock.returns. If the function is async or returns a promise, it will always succeed and have aPromiseinresults. To make migration easier, we introducedspy.mock.settledResultsthat unwraps promises andexpect().toHaveResolved()matcher that accepts unwrapped value.
-
- Do not exit process if global setup has failed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5726 (ddb09)
- Don't exit process if config failed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5715 (f232f)
- Add meta to
jsonoutput - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5802 (dd754) - Rename
indexScriptstoorchestratorScriptsin the browser config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5842 (49f34) - Add "vitest list" API to print collected tests without running them - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6013 (583dd)
-
⚠️ This changes the custompoolAPI - now requirescollectTestsmethod alongsiderunTests.
-
- Remove the empty suite from the runner - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5435 (dbbbe)
- Support concurrent suites - by @hi-ogawa in https://github.com/vitest-dev/vitest/pull/5491 (222ce44)
- Support overriding
excludein coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5997 (169bc)-
⚠️ Vitest coverage no longer adds test files toexcludepatterns ifcoverage.excludewas overridden in the config. Add your test patterns manually, or merge your overrides with default ones:['**/my-pattern.js', ...coverageConfigDefaults.exclude]. See https://vitest.dev/config/#coverage-exclude for an example.
-
-
api:
- Remove
process.exitif workspace project failed to be created - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5804 (a820e) - Don't call
process.exitmanually - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5926 (e9b63)
- Remove
🚀 Features
-
browser:
-
🌐 This release lays the groundwork for the next iteration of Vitest Browser Mode. You can read more about our future plans at https://github.com/vitest-dev/vitest/discussions/5828 - Add commands to communicate betweens server and the browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5097 (aa431)
- Do not reload the page during watch mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5810 (e5b9a)
- Support changing the viewport - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5811 (71851)
- Add browser iframe mouse interaction - by @userquin in https://github.com/vitest-dev/vitest/issues/5815 (f29b9)
- Support
clickevent - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5777 (839c3) - Rename none provider to preview, make it default - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5826 (18310)
- Run tests in parallel in headless mode, add
page.screenshotmethod - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5853 (81c42) - Implement several
userEventmethods, addfillanddragAndDropevents - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5882 (4dbea) - Introduce
expect.dommethod and bundlejest-dommatchers with@vitest/browser- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5910 (3a96a) - Expose CDP in the browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5938 (bec43)
- Add "init" command for browser tests - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5960 (49e97)
- Add an option to take screenshots if the browser test fails - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5975 (154cb)
- Add
tripleClickto interactive api - by @userquin in https://github.com/vitest-dev/vitest/issues/5987 (200a4) - Playwright provider doesn't allow resizing the browser viewport - by @userquin and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5984 (ff978)
-
- Pretty print diffs coming from cause - by @dubzzz in https://github.com/vitest-dev/vitest/issues/5660 (6faf8)
- Allow import statement as vi.mock path for better IDE support - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5690 (a99a1)
- Remove deprecated options - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5696 (5c308)
- Add blob reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5663 (e2053)
-
✅ Run Vitest in separate processes with--reporter=blobflag to generate reports and combine them withvitest --merge-reportslater!
-
- Add expect.poll utility - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5708 (e2e0f)
- Add browser.ui option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5771 (a5033)
- Add median to
--output-json- by @Joristdh in https://github.com/vitest-dev/vitest/issues/5745 (0766b) - Allow augmenting config.test.env - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5784 (b2469)
- Implement module mocking in browser mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5765 (7b2f6)
- Allow configuring expect options in the config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5729 (fc53f)
- Add an option to print console stack trace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5720 (e4fe6)
- Add browser frame to UI - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5808 (3796d)
- Image type add bmp - by btea in https://github.com/vitest-dev/vitest/issues/5921 (98f9b)
- Add an option to return base64 from page.screenshot - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5993 (be323)
- Expose
parseAst,parseAstAsyncfrom vite - by @sheremet-va (f645e) -
config:
- Allow percentage value for workers option - by @syi0808 in https://github.com/vitest-dev/vitest/issues/5982 (b1a27)
-
runner:
- Implement
test.for- by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5861 (c2380)
- Implement
-
spy:
- Collect mock.contexts - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5955 (3b31a)
-
ui:
- Render tests in a tree - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5807 (7900f)
- Load module graph on tab selection - by @userquin in https://github.com/vitest-dev/vitest/issues/5844 (b117e)
- Replace navigation tree with test explorer - by @userquin in https://github.com/vitest-dev/vitest/issues/5907 (45dfc)
- Add initializing explorer logic - by @userquin in https://github.com/vitest-dev/vitest/issues/5941 (c31c4)
- Add action to explorer item to show the test/suite line in the source code tab - by @userquin and Anjorin Damilare in https://github.com/vitest-dev/vitest/issues/5948 (7ec29)
-
ws-client:
- Allow change reactive for state, filesMap and idMap - by @userquin in https://github.com/vitest-dev/vitest/issues/5906 (e6020)
🐞 Bug Fixes
- Print console statements in vmThreads - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5678 (34a80)
- Repeatable
--excludeoption - by @fregante in https://github.com/vitest-dev/vitest/issues/5782 (d6700) - Remove browser.fileParallelism - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5790 (b881e)
- Install UI icons - by @sheremet-va (b84f1)
- Vi.waitFor/vi.waitUntil interval is now cleared after it times out - by @pedro00dk in https://github.com/vitest-dev/vitest/issues/5875 (04107)
- ToJSON recursive error serialization - by @eddienubes in https://github.com/vitest-dev/vitest/issues/5848 and https://github.com/vitest-dev/vitest/issues/5884 (8d55d)
- Print error properties only in verbose reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5917 (2bd8d)
- Use TTY reporter when running in Deno - by @marvinhagemeister in https://github.com/vitest-dev/vitest/issues/5972 (e0f45)
- Don't override uppercase - by @sheremet-va (caef4)
- Clear screen and scrollback on iTerm2 - by @kxalex in https://github.com/vitest-dev/vitest/issues/5978 (d7f23)
- Include pretty-format in @vitest/runner for optimization on npm - by @sheremet-va (42bd4)
- Transpile esnext to node18 to support newest JS and TS features - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4409 (8f65a)
-
api:
- Correct
project.providetype - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5959 (0eda9)
- Correct
-
browser:
- Display UI - by @sheremet-va (d41e4)
- Browser actions icons colors - by @userquin in https://github.com/vitest-dev/vitest/issues/5816 (f9d9b)
- Restore the original viewport when unselecting the preset viewport - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5821 (5ebb3)
- Don't get stuck after the manual page refresh - by @sheremet-va (2220b)
- Use iframe id instead of calculating it from filenames - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5823 (34a31)
- Always clean up iframes on rerun - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5827 (087fa)
- Support @testing-library/vue in browser mode out of the box - by @sheremet-va (76b82)
- Print correct transformed module graph - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5833 (a7581)
- Use
previewprovider when running in StackBlitz - by @userquin in https://github.com/vitest-dev/vitest/issues/5836 (76e13) - Specify entries for correct deps optimization - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5839 (c79b3)
- Allow iframe to load even if there is a custom CSP header - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5841 (caaaf)
- Don't optimize Vitest dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5843 (f15b4)
- Set server.open to false and move error handling after init - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5845 (47003)
- Show correct prepare time - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5852 (52d54)
- Resolve
coverage.reporterfrom string values - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5920 (f33da) - Correctly update inline snapshot if changed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5925 (2380c)
- Remove "util" warning - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5935 (48f28)
- Remove hacky retry - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5971 (2a2c9)
- Make userEvent more stable when running in parallel - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5974 (14a21)
- Print screenshot path alongside the test error message - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5992 (15289)
- Print correct stack trace in source files - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6003 (62aa7)
- Correctly mock optimized cjs dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6035 (057b4)
- Support shadow root and svg elements - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6036 (2e3c8)
-
coverage:
- Clean up empty coverage reports directory - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5731 (c469c)
-
thresholds.autoUpdateto supportmergeConfig- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5818 (7afb3) - Pass thresholds errors to
stderrofstartVitest()- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5954 (70805) - Exclude bench files from coverage - by @kouak in https://github.com/vitest-dev/vitest/issues/5983 (429e1)
- Vite to ignore dynamic import of provider - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5998 (6d884)
- Istanbul to support import attributes - by @Gravitonic in https://github.com/vitest-dev/vitest/issues/6006 (2898a)
- Remove work-around for implicit
else- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6014 (368c1)
-
deps:
- Update dependency @testing-library/dom to v10 - by renovate[bot] in https://github.com/vitest-dev/vitest/issues/5866 (e9745)
- Update vulnerable
test-excludeto v7 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5867 (0a715)
-
expect:
- Fix immutable.js iterable equality - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5692 (1532c)
-
forks:
- Resolve
poolOptions.<name>.isolatefromforksoptions - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5840 (a60a1)
- Resolve
-
runner:
- Ensure inner suite { sequential: true } correctly overrides outer suite { concurrent: true } - by @pengooseDev in https://github.com/vitest-dev/vitest/issues/5737 (a20e7)
- Ensure test.each print -0 and -NaN properly - by @pengooseDev in https://github.com/vitest-dev/vitest/issues/5806 (9ac8f)
-
snapshot:
- Fix
toMatchFileSnapshotwith empty file - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5894 (88006)
- Fix
-
spy:
- Correctly track constructor's "this" type - by @sheremet-va (4776e)
-
types:
- Mark pool options as not available in project config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5934 (486fd)
-
ui:
- Show correct module graph and project name in a Vitest workspace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5792 (48c50)
- Update running todo tests inside todo suites (each) - by @userquin in https://github.com/vitest-dev/vitest/issues/5939 (63ae1)
-
FileDetailstitle status icon not being updated - by @userquin in https://github.com/vitest-dev/vitest/issues/5942 (e9ddf)
-
ui, browser:
- Disable mouse events when resizing main navigation panel - by @userquin in https://github.com/vitest-dev/vitest/issues/5863 (7cbd9)
-
utils:
- Produce valid snapshot names - by @dubzzz in https://github.com/vitest-dev/vitest/issues/5724 (1ec61)
- Fix color util maximum call stack error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5733 (a4ec5)
- Package exports - by @userquin in https://github.com/vitest-dev/vitest/issues/5847 (07876)
-
vite-node:
- Expose all envs from .env file, not just with a prefix
VITE_- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6017 (d87be)
- Expose all envs from .env file, not just with a prefix
-
vitest:
- Expose
provideto the public API - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5897 (66e64) - Cache fs code only for forks pool - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5909 (e30d9)
- Allow testing unandled rejection/exception - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6016 (c8d56)
- Show all failed tests when rerunning a test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6022 (91ba6)
- Expose
View changes on GitHub
v1.6.0
🚀 Features
- Support standalone mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5565 (bdce0)
- Custom "snapshotEnvironment" option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5449 (30f72)
- benchmark: Support comparing benchmark result - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5398 (f8d3d)
- browser: Allow injecting scripts - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5656 (21e58)
-
reporter: Support
includeConsoleOutputandaddFileAttributein junit - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5659 (2f913) - ui: Sort items by file name - by @btea in https://github.com/vitest-dev/vitest/issues/5652 (1f726)
🐞 Bug Fixes
- Keep order of arguments for .each in custom task collectors - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5640 (7d57c)
- Call
resolveId('vitest')afterbuildStart- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5646 (f5faf) - Hash the name of the file when caching - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5654 (c9e68)
- Don't panic on empty files in node_modules - by @sheremet-va (40c29)
- Use
toJSONfor error serialization - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5526 (19a21) -
coverage:
- Exclude
*.test-d.*by default - by @MindfulPol in https://github.com/vitest-dev/vitest/issues/5634 (bfe8a) - Apply
vite-node's wrapper only to executed files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5642 (c9883)
- Exclude
-
vm:
- Support network imports - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5610 (103a6)
🏎️ Performance
- Improve performance of forks pool - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5592 (d8304)
- Unnecessary rpc call when coverage is disabled - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5658 (c5712)
View changes on GitHub
v1.5.3
🐞 Bug Fixes
- Use package.json name for a workspace project if not provided - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5608 (48fba)
- Backport jest iterable equality within object - by @sukovanej in https://github.com/vitest-dev/vitest/issues/5621 (30e5d)
- browser: Support benchmark - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5622 (becab)
- reporter: Use default error formatter for JUnit - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/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 acceptstdoutandstdin- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5493 (780b1)- This is listed as a feature, but it doesn't increase the minor version because
startVitestAPI 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 https://github.com/vitest-dev/vitest/issues/5544 (413ec)
- Fix default
import.meta.env.PROD: false- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5561 (9c649) - Resolve cwd correctly when initiating projects - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5582 (ec9d7)
- Always run
onTestFinishedin reverse order - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5598 (23f29) -
browser:
- Disable
fileParallelismby default on browser pool - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5528 (5c69f) - Dispose tester iframe on done - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5595 (b2135)
- Disable
-
coverage:
- Fix bundling of
v8-to-istanbul- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5549 (df6a4) - Prevent crash when
cleanOnRerunis disabled - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5540 (ea3c1) -
thresholdsto compare files relative to root - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5574 (80265)
- Fix bundling of
-
expect:
- Fix
toEqualandtoMatchObjectwith circular references - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5535 (9e641)
- Fix
-
vitest:
- Fix false positive file filter match with leading slash - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5578 (316eb)
- Watch the output directory correctly - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5584 (e40f9)
- StubEnv casts boolean on PROD/SSR/DEV - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5590 (4da88)
View changes on GitHub
v1.5.0
🚀 Features
- Add configuration for diff truncation - by @willieho in https://github.com/vitest-dev/vitest/issues/5073 and https://github.com/vitest-dev/vitest/issues/5333 (6797b)
- Remove unrelated noise from diff for toMatchObject() - by @geersch in https://github.com/vitest-dev/vitest/issues/5364 (99276)
- Allow custom host for --inspect and --inspect-brk - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5509 (61572)
- coverage: V8 to ignore empty lines, comments, types - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5457 (10b89)
🐞 Bug Fixes
-
describecalls not taking generic type parameters - by @aryaemami59 in https://github.com/vitest-dev/vitest/issues/5415 (16bac) - Prevent hang when
processis mocked - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/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 https://github.com/vitest-dev/vitest/issues/5428 (67485)
- Increase stack trace limit for location, don't hardcode suite position - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5518 (04b23)
-
benchmark:
- Run benchmark suites sequentially - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5444 (1f548)
- Fix benchmark summary of single bench suite - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5489 (db981)
- Table reporter for non TTY output - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5484 (bea23)
-
expect:
- Fix
toHaveBeenNthCalledWitherror message when not called - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5420 (e5253)
- Fix
-
types:
- Pass correct type for suite factory - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5437 (26718)
-
utils:
- Fix object diff with getter only property - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5466 (366d9)
-
vite-node:
- Fix
isValidNodeImportto check"type": "module"first - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5416 (6fb15)
- Fix
-
vitest:
- Correctly send console events when state changes - by @sheremet-va (3463f)
- Initiate FakeTimers on demand - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5450 (e4e93)
- Check unhighlighted code for code frame line limit - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5465 (6ae7e)
- Correctly filter by parent folder - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5408 (91b06)
- Close inspector immediately if run is canceled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5519 (b8006)
-
workspace:
- Set CWD to config directory, allow overriding local .env - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5476 (d4003)
View changes on GitHub
v1.4.0
🚀 Features
- Throw error when using snapshot assertion with
not- by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5294 (b9d37) - Add a flag to include test location in tasks - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5342 (d627e)
-
cli:
- Support wildcards in
--projectoption - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5295 (201bd)
- Support wildcards in
-
config:
- Add
shuffle.filesandshuffle.testsoptions - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5281 (356db) - Deprecate
cache.diroption - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5229 (d7e8b)
- Add
-
coverage:
- Support
--changedoption - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5314 (600b4)
- Support
-
vitest:
- Support
clearScreencli flag - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5241 (e1735)
- Support
🐞 Bug Fixes
- Repeatable
--projectoption - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5265 (d1a06) -
--inspect-brkto pause before execution - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5355 (e77c5) - Correct locations in test.each tasks - by @sheremet-va (4f6e3)
-
api:
- Use resolvedUrls from devserver - by @saitonakamura and @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5289 (2fef5)
-
browser:
- Add
magic-stringtooptimizeDeps.include- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5278 (8f04e)
- Add
-
coverage:
- Expensive regexp hangs v8 report generation - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5259 (d68a7)
- V8 to ignore type-only files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5328 (c3eb8)
- Respect source maps of pre-transpiled sources - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5367 (6eda4)
- Prevent
reportsDirectoryfrom removing user's project - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5376 (07ec3)
-
expect:
- Show diff on
toContain/toMatchassertion error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5267 (8ee59)
- Show diff on
-
forks:
- Wrap
definesto supportundefinedvalues - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5284 (5b58b)
- Wrap
-
typecheck:
- Update get-tsconfig 4.7.3 to fix false circularity error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5384 (bdc37)
-
ui:
- Escape html in error diff - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5325 (ab60b)
-
vitest:
- Loosen
onConsoleLogreturn type - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5337 (6d1b1) - Ensure restoring terminal cursor on close - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5292 (0bea2)
- Ignore timeout on websocket reporter rpc - by @sheremet-va (38119)
- Correctly override api with --no-api flag - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5386 (51d1d)
- Logs in
beforeAllandafterAll- by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5288 (ce5ca)
- Loosen
-
workspace:
- Throw error when browser mode and
@vitest/coverage-v8are used - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5250 (29f98)
- Throw error when browser mode and
View changes on GitHub
v1.3.1
🚀 Features
-
vitest: Expose parseCLI method - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/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 https://github.com/vitest-dev/vitest/issues/5235 (38155)
- coverage: Ignore generated TS decorators - by @AriPerkkio and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5206 (a2804)
- ui: Auto reload coverage iframe after test run - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5242 (5376d)
View changes on GitHub
v1.3.0
🚀 Features
- Deprecate watchExclude - by @patak-dev in https://github.com/vitest-dev/vitest/issues/5171 (82885)
-
browser:
- Run test files in isolated iframes - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5036 (4f401)
-
config:
- Add
snapshotSerializersoption - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5092 (5b102)
- Add
-
reporters:
- Support custom options - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5111 (fec9c)
-
runner:
- Support automatic fixtures - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5102 (0441f)
-
ui:
- Save splitpanes size to local storage - by @posva in https://github.com/vitest-dev/vitest/issues/5166 (c28b4)
-
vitest:
- Add onTestFinished hook - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5128 (6f5b4)
- Add github actions reporter - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5093 (40afb)
- Expose jsdom global if jsdom environment is enabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5155 (567d2)
- Add new CLI options - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5163 (4e179)
- "test" accepts options object as the second parameter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5142 (7d9b1)
-
vm:
- Support wasm module - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5131 (5ed53)
🐞 Bug Fixes
- Fix sourcemap in vm pools - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5063 (81105)
- Don't optimize react/jsx-runtime by default when running in Node - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5079 (0d2bf)
- Rpc timeout error messages to include caller - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5103 (a6e04)
- Requires fixed version across the monorepo - by @antfu in https://github.com/vitest-dev/vitest/issues/5208 (68f51)
- Prevent merging of
poolOptions- by @penalosa in https://github.com/vitest-dev/vitest/issues/5221 (bc5b2) -
browser:
- Don't exclude node builtins from optimization - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5082 (714c9)
- Support
coverage.reportsDirectorywith multiple directories - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5056 (ae73f)
-
cli:
- Parse
--browser=<name>correctly - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5179 (656e2)
- Parse
-
coverage:
-
.tmpdirectory conflicts with--shardoption - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5184 (5749d)
-
-
deps:
- Update dependency strip-literal to v2 - by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/5136 (ef557)
-
reporters:
- Testsuite name should include project root in Junit output - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5116 (2494f)
-
typecheck:
- Fix suite collection while-loop - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5065 (35675)
-
ui:
- Fix tests duration time - by @vovsemenv in https://github.com/vitest-dev/vitest/issues/5219 (58103)
-
utils:
- Fix asymmetric matcher diff inside array - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5189 (3ffcd)
-
vitest:
- Correctly report failed test files as failures in json reporter, export json reporter types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5081 (0417b)
- Don't run typecheck tests in browser if both are enabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5080 (1045b)
- Handle function config inside
defineWorkspace- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5089 (0bf52) - Remove excessive listeners when running without isolation, don't reset the state - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5132 (b607f)
- Auto-enable "github-actions" only where users didn't configure reporters - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5158 (ef044)
- Support more array cli options - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5162 (3afe6)
- Add types for the new global
jsdomvariable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5164 (0f898) - Expose onTestFinished globally - by @sheremet-va (1304f)
- Disable optimizer by default until it's stable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5156 (e1bd8)
- Delegate snapshot options to workspace from root config - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5199 (86297)
- Fix
optimizeDeps.disabledwarnings on Vite 5.1 - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5215 (1aecd)
-
vm:
- Handle
disableConsoleInterceptconfig - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5074 (a55ad) - Improve error when module is not found - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5053 (79a50)
- Handle
View changes on GitHub
v1.2.2
🐞 Bug Fixes
-
coverage:
- Remove
coverage/.tmpfiles after run - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5008 (d53b8) - Don't crash when re-run removes earlier run's reports - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5022 (66898)
- Remove
-
expect:
- Improve
toThrow(asymmetricMatcher)failure message - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5000 (a199a)
- Improve
-
forks:
- Set correct
VITEST_POOL_ID- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5002 (7d0a4)
- Set correct
-
threads:
- Mention common work-around for the logged error - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5024 (915d6)
-
typecheck:
- Fix
ignoreSourceErrorsin run mode - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5044 (6dae3)
- Fix
-
vite-node:
- Provide import.meta.filename and dirname - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5011 (73148)
-
vitest:
- Expose getHooks & setHooks - by @adriencaccia in https://github.com/vitest-dev/vitest/issues/5032 (73448)
- Test deep dependencies change detection - by @blake-newman in https://github.com/vitest-dev/vitest/issues/4934 (9c7c0)
- Throw an error if vi.mock is exported - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5034 (253df)
- Allow
useFakeTimersto fakerequestIdleCallbackon non browser - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5028 (a9a48) - Support older NodeJS with async
import.meta.resolve- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5045 (cf564) - Don't throw an error if mocked file was already imported - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5050 (fff1a)
View changes on GitHub
v1.2.1
🐞 Bug Fixes
-
browser:
- Apply inlined workspace config to browser mode vite server - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4947 (db01f)
- Fix browser testing url for https - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4855 (6c1cc)
- Don't fail when calling vi.useFakeTimers - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4992 (6c5fe)
-
coverage:
-
thresholds.autoUpdateto work with arrow function configuration files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4959 (4b411)
-
-
expect:
- Implement chai inspect for
AsymmetricMatcher- by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4942 (06bae)
- Implement chai inspect for
-
vite-node:
- Externalize network imports - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4987 (21f57)
-
vitest:
- Handle single
await vi.hoisted- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4962 (dcf2e) - Simplify hoist transform check regex to avoid expensive regex match - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4974 (df0db)
- Correctly find module if it has a version query - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4976 (952c3)
- Check color support for intercepted console logging - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4966 (39a71)
- Use development/production conditions when resolving external modules - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4980 (8877e)
- Throw a syntax error if vi.hoisted is directly exported - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4969 (f8bff)
- Handle single
View changes on GitHub
v1.2.0
🚀 Features
- Support case-insensitive path matching in cli - by @tigranmk in https://github.com/vitest-dev/vitest/issues/3567 and https://github.com/vitest-dev/vitest/issues/4911 (1326c)
- Add typeahead search - by @bonyuta0204 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4275 and https://github.com/vitest-dev/vitest/issues/4733 (480d8)
- Add syntax highlighting to error messages - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4813 (8c969)
- Allow extending toEqual - by @tigranmk and @sheremet-va in https://github.com/vitest-dev/vitest/issues/2875 and https://github.com/vitest-dev/vitest/issues/4880 (463be)
-
coverage:
- Custom reporter support - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4828 (96dc6)
-
ui:
- Show unhandled errors on the ui - by @spiroka and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4380 (7f59a)
-
vitest:
- Add
--disable-console-interceptoption to allow opting-out from automatic console log interception - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4786 (43fa6) - Show slow test duration in verbose reporter on CI - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4929 (ccb25)
- Allow overiding package installer with public API - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4936 (c2cce)
- Add
🐞 Bug Fixes
-
browser:
- Support vite config
server.headers- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4890 (55f53) - Fix
testNamePatternconfig - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4909 (4add9) - Fix updating snapshot during watch mode - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4867 (508fc)
- Remove redundant test failure logging - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4891 (7fd44)
- Support vite config
-
happy-dom:
- Window.close() for environment teardown - by @capricorn86 in https://github.com/vitest-dev/vitest/issues/4931 (91719)
-
utils:
- Fix
objDisplaydefault truncate option fortest.eachtitle - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4917 (9ae9d)
- Fix
-
vitest:
- Fix tap reporter to handle custom error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4897 (f8ba8)
- Gracefully exit Vitest if
process.exitis called inside the test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4903 (8e6c1) - Throw "cannot mock" error only in isolated pools - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4905 (f99cc)
- Don't throw SyntaxError when "await vi.hoisted" is used - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4915 (ca62f)
- Correctly parse --maxWorkers/--minWorkers - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4924 (0e77e)
- Show correct error when vi.hoisted is used inside vi.mock and the other way around - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4916 (c4eac)
- Call global teardown when using workspaces - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4935 (528bd)
- Use file instead of id for HMR - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4938 (ca76f)
- Add inlined deps to ssr.noExternal so they are added to the module graph - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4945 (1663f)
-
workspace:
- Support overring
poolandpoolOptionson project level - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4765 (e9fe4)
- Support overring
View changes on GitHub
v1.1.3
🐞 Bug Fixes
-
vitest:
- Vi.mock breaks tests when using imported variables inside the factory - by @sheremet-va and Dunqing in https://github.com/vitest-dev/vitest/issues/4873 (7719e)
- Apply
slowTestThresholdto all reporters - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4876 (1769c)
View changes on GitHub
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 https://github.com/vitest-dev/vitest/issues/4863 (345a2)
- Resolved failure to find arbitrarily-named snapshot files when using
expect(...).toMatchFileSnapshot()matcher. - by @zmullett, Zac Mullett and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4839 (b8140) - Handle config.base - by @mbland and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4686 and https://github.com/vitest-dev/vitest/issues/4692 (9e345)
-
deps:
- Update dependency acorn-walk to ^8.3.1 - by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4837 (47bc2)
- Update dependency sirv to ^2.0.4 - by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4838 (df261)
-
runner:
- Fix fixture cleanup for concurrent tests - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4827 (1fee6)
-
spy:
- Don't allow
PromiseinmockImplementationif it's not in the function signature - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4859 (072e0)
- Don't allow
-
vite-node:
- Correctly return cached result - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4870 (15bbb)
-
vitest:
- Throw an error if mock was already loaded when
vi.mockis called - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4862 (e12a5) - Correctly rerun test files on change if server was restarted - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/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 https://github.com/vitest-dev/vitest/issues/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 https://github.com/vitest-dev/vitest/issues/4698 (ee8b4)
- Don't fail if
inline: trueis set - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4815 (8f622) - Correct option name
--no-parallelism- by @bonyuta0204 in https://github.com/vitest-dev/vitest/issues/4831 (5053a) - Match jest json output by making json reporter output ndjson-compatible - by @bard in https://github.com/vitest-dev/vitest/issues/4824 (7e6a6)
-
runner:
- Reset "current test" state on dynamic
skip- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4814 (19faf)
- Reset "current test" state on dynamic
-
vitest:
- Don't hang when mocking files with cyclic dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4811 (e8ca6)
- Initialize snapshot state only once for each file suite - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4796 (957da)
- Fix file snapshots in skipped suites considered obsolete - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4795 (06c14)
- Show
beforeAll/afterAllerrors in junit reporter - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4819 (2baea)
-
vm-threads:
- Tests not cancelled on key press, cancelled tests shown twice - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4781 (cf53d)
View changes on GitHub
v1.1.0
🚀 Features
- Add es-main compatibility to vite-node - by @zookatron in https://github.com/vitest-dev/vitest/issues/4751 (486a3)
- Add
--workspaceoption, fix root resolution in workspaces - by @sheremet-va and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4773 (67d93) - Add
--no-file-parallelism,--maxWorkers,--minWorkersflags - by @sheremet-va and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4705 (fd5d7) - Add
--no-isolateflag to improve performance, add documentation about performance - by @sheremet-va, @AriPerkkio and Pascal Jufer in https://github.com/vitest-dev/vitest/issues/4777 (4d55a) - Add
--excludeCLI flag - by @Namchee and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4279 (f859e)
🐞 Bug Fixes
- Correctly reset provided values - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4775 (5a71e)
-
expect:
- Fix
toHavePropertyassertion error diff - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4734 (f8f70)
- Fix
-
runner:
- Handle fixture teardown error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4683 (c6f5f)
-
types:
-
defineWorkspacefix intellisense and report type errors - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4743 (9cc36)
-
-
ui:
- Escape html for console log view - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4724 (e0dde)
- Fix coverage iframe url for html report preview - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4717 (71911)
- Show file item when search filter matches only test cases - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4736 (f43fd)
-
vitest:
- Pass down CLI options to override workspace configs - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/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=falseresolved incorrectly - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4697 (a7931)
🏎️ Performance
-
reporters: Downgrade
log-updateto v5 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4711 (13ff9)
View changes on GitHub
v1.0.3
🐞 Bug Fixes
- Correct package exports - by @userquin in https://github.com/vitest-dev/vitest/issues/4707 (37388)
- runner: Fix async fixture teardown - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4700 (92afd)
- vitest: Correctly filter changed files when Vitest workspace is used - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4693 (34135)
🏎️ Performance
-
reporters: Downgrade
log-updateto v5 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4711 (13ff9)
View changes on GitHub
v1.0.2
🐞 Bug Fixes
- Don't check if vite is installed - by @wojtekmaj in https://github.com/vitest-dev/vitest/issues/4659 (775e2)
- Fix ensurePackageInstalled on Yarn PnP - by @wojtekmaj in https://github.com/vitest-dev/vitest/issues/4657 (574cc)
- Apply
stripSnapshotIndentationfor thrown snapshot - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4663 (74820) -
cli:
- Prompted packages fail to install - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4593 (a9908)
-
expect:
- Apply
URLequality check only whenURLis available - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4670 (43783)
- Apply
-
runner:
- Improve fixture error messages - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4673 (1e4aa)
- Fix fixture cleanup when test times out - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4679 (e7c5e)
-
vitest:
- Support new Request('/api') in happy-dom - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4671 (6e6ee)
- Skip processing getter in auto-mocked constructor call - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4677 (cb786)
View changes on GitHub
v1.0.1
🐞 Bug Fixes
- Bump vitest packages
peerDependenciesversions - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/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
poolandpoolOptions, remove old flags - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4172 (114a9) - Support multiple parallel
child_process- by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3925 (8b4a4) - Make snapshots more visually pleasing by @sheremet-va in https://github.com/vitest-dev/vitest/pull/3961
- Set
vitestpeer dependency range for sub packages - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4299 (cd03c) - Bump minimum node version to 18 and match Vite 5 requirement - by @ghiscoding in https://github.com/vitest-dev/vitest/issues/4296 (263b7)
- Remove deprecated node loader - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4371 (29299)
- Move browser providers to @vitest/browser package - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4364 (5cdeb)
- Remove EnhancedSpy type, deprecate SpyInstance, improve mocks and vi documentation - by @sheremet-va and @dammy001 in https://github.com/vitest-dev/vitest/issues/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 https://github.com/vitest-dev/vitest/issues/4239 (ce84f) - runner: Correctly process custom tasks, update runner hooks naming by @sheremet-va in https://github.com/vitest-dev/vitest/pull/4076
-
coverage:
- glob based coverage thresholds by @AriPerkkio in https://github.com/vitest-dev/vitest/pull/4442 (18300)
- Use
transformModeand workspace project based source maps - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4309 (28109cc) - Enable
coverage.allby default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4265 (5a741)
🚀 Features
- Add Marko example and include code coverage for Marko files - by @DylanPiercey in https://github.com/vitest-dev/vitest/issues/4263 (eac77)
- Update magic-string - by @bluwy in https://github.com/vitest-dev/vitest/issues/4345 (fde18)
- Implement provide/inject API to transfer data from the main thread - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4422 (a7522)
- Improve expectTypeOf error messages - by @mmkal, Misha Kaletsky and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4206 (18300)
- Add test.sequential() api - by @dsyddall in https://github.com/vitest-dev/vitest/issues/4512 (c3619)
- Allow custom pools - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4417 (a3fd5)
- Add --project option to limit what projects are running - by @sheremet-va, @dammy001 and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4561 (58ef5)
-
benchmark:
- Move importTinybench to runner - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4376 (c36d2)
-
browser:
- Support "none" provider and update lit example to use it - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4427 (d03a2)
-
coverage:
- Support
/* v8 ignore...ignore hints - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4573 (f9e4a)
- Support
-
expect:
- Support
expect.closeToapi - by @Dunqing and golebiowskib in https://github.com/vitest-dev/vitest/issues/4260 (7f91c) - Compare URL objects by href - by @kleinfreund and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4615 (f7a73)
- Support
-
snapshot:
- Add option to configure snapshot directory - by @d3lm in https://github.com/vitest-dev/vitest/issues/4651 (20b2a)
-
vite-node:
- Support import.meta.hot.off for vite 5 - by @bluwy in https://github.com/vitest-dev/vitest/issues/4315 (01b1c)
-
vitest:
- Expose getBenchFn, getBenchOptions - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4208 (8e5e4)
- Run typecheck during tests - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4324 (a1aad)
- Filter stacktraces - by @clarkf in https://github.com/vitest-dev/vitest/issues/1999 and https://github.com/vitest-dev/vitest/issues/4338 (6b734)
- Expose execArgv to the different pools - by @adriencaccia in https://github.com/vitest-dev/vitest/issues/4383 (9021e)
🐞 Bug Fixes
- Add multiple globals in VM+JSDOM - by @nstepien in https://github.com/vitest-dev/vitest/issues/4199 and https://github.com/vitest-dev/vitest/issues/4202 (fc947)
- Ignore "plugins" field in snapshotFormat option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4204 (db1ff)
-
nextTickmocking error message to mention correct config option - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4215 (98fe3) - Export VitestUtils interface - by @fbritoferreira in https://github.com/vitest-dev/vitest/issues/4301 (b1439)
- Assertion diff message handle non-writable sub-properties - by @bfamchon in https://github.com/vitest-dev/vitest/issues/4278 (7e1a0)
- Don't bundle import from rollup - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4392 (3b584)
- Support accessing fixture at same index of dependency fixture - by @dsyddall in https://github.com/vitest-dev/vitest/issues/4387 (4cd1d)
- Make asynchronous fixtures work concurrently - by @dsyddall in https://github.com/vitest-dev/vitest/issues/4403 (3c9f9)
- Coverage.100 crash when using as an cli argument - by @marcelobotega in https://github.com/vitest-dev/vitest/issues/4346 (0db38)
- Support typechecking with Yarn PnP - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4412 (1ecbe)
- Support accessing task from test context without accessing fixtures - by @dsyddall in https://github.com/vitest-dev/vitest/issues/4419 (3397f)
- Copy custom asymmetric matchers to local
expect- by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4405 (9fe38) - Apply serializer to
Errorinstance for thrown snapshot - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4396 (ac309) - Throw an error when running "vitest typecheck" - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4439 (7f502)
- Don't expand snapshot diff by default - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4430 (8983c)
- Handle errors thrown in fixtures - by @dsyddall (f6844)
- Default --open to !process.env.CI - by @collinstevens in https://github.com/vitest-dev/vitest/issues/4477 (088a0)
- Disable ESBuild when user config disables it - by @Namchee in https://github.com/vitest-dev/vitest/issues/4492 (9abde)
- Inherit concurrent/sequential in nested suites - by @dsyddall in https://github.com/vitest-dev/vitest/issues/4482 (ca168)
- Provide customTesters to asymmetric matchers - by @sheremet-va (ac665)
- Apply
retryandbailfrom test config file - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4530 (94f9a) - Respect trailing slash when filtering by file path - by @ibuibu in https://github.com/vitest-dev/vitest/issues/4538 (f377a)
- Date prototype when using setSystemTime - by @spiroka in https://github.com/vitest-dev/vitest/issues/4584 (3f8c3)
- BrowserTestRunner called incorrect super methods - by @samthor in https://github.com/vitest-dev/vitest/issues/4632 (8385c)
- Set process name for idle workers - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4641 (eca25)
-
bench:
- Extract ChainableBenchmarkAPI type - by @dsyddall in https://github.com/vitest-dev/vitest/issues/4537 (79e9b)
-
browser:
- Improve error handling and don't rely on Node.js builtin modules in browser mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4244 (e7e8c)
- Disable hijacking ES modules until vi.mock is implemented - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4414 (ab556)
- Add vitest/ imports to entries - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4514 (648bc)
- Wait until vite finishes prebundling of vitest dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4518 (56ee7)
- Allow for
pretty-formatas a sibling dependency - by @nicojs in https://github.com/vitest-dev/vitest/issues/4590 (ed50a) - Don't go into an infinite reload loop, don't fail if "error" event is caught - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4618 (ec3d6)
- Respect "server" option in vite config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4627 (723f6)
-
cli:
- Do not capture
stdinwhen in run mode - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4310 (fc51a)
- Do not capture
-
config:
- Type issue of
poolandpoolMatchGlobsin defineConfig - by @InfiniteXyy in https://github.com/vitest-dev/vitest/issues/4282 (9112c)
- Type issue of
-
coverage:
-
thresholdAutoUpdateto detect zero limits - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4287 (a29fe) - Exclude files and directories starting with dot by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4428 (b3327)
- Improve memory usage by writing temporary files on file system - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4603 (4166c)
-
-
deps:
- Update dependency v8-to-istanbul to ^9.2.0 - by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4583 (a70f2)
- Update dependency std-env to ^3.5.0 - by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4582 (1fdd6)
-
example:
- Resolve type error - by @jqkk in https://github.com/vitest-dev/vitest/issues/4515 (2d1b4)
-
expect:
- Publish types file - by @sheremet-va (5996c)
-
Object.freezebreakstoEqual- by @Dunqing in https://github.com/vitest-dev/vitest/issues/4303 (a4501) - Publish semantically correct chai types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4322 (80a70)
- Print full error if promise is rejected - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4467 (cadb9)
- Don't fail when using jest expect - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4517 (60d6d)
-
happy-dom:
- Don't crash when calling useFakeTimers with empty config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4214 (2e1a1)
-
jsdom:
- Don't go into an infinite recusion when calling atob - by @sheremet-va (da794)
-
runner:
- Fixture needs to be initialized for each test - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4250 (76a93)
- Nested tests should throw errors - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4262 (8ac9f)
- Removes deprecated
erroroption from TaskResult - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4313 (4cee6) - Preserve fixtures when calling runif and skipif - by @dsyddall in https://github.com/vitest-dev/vitest/issues/4585 and https://github.com/vitest-dev/vitest/issues/4591 (515ea)
- PassWithNoTests option not work - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4553 (8d183)
-
vite-node:
- Have a separate cache for web/ssr transforms - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4221 (ca5db)
- Mjs files watch not work - by @Dunqing in https://github.com/vitest-dev/vitest/issues/3982 (77ea9)
-
vitest:
- Make @types/node optional - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4210 (a5383)
- Inline chai types instead of using @types/chai - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4209 (5f477)
- Don't initialize globalSetup if workspace doesn't run tests - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4213 (06461)
- Deduplicate vitest when running globally or in a workspace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4238 (93504)
- Print file path instead of "unknown test" when logging - by @Dunqing in https://github.com/vitest-dev/vitest/issues/4146 (ec2e8)
- Failed to load custom environment from js/ts file - by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4255 (da8d0)
- Support assets in new URL in Vite 5 - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4258 (d280f)
- Correctly hoist
vi.hoistedif assigned - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4285 (ff93a) - Run globalSetup from the root config even if it's not in a workspace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4325 (4293e)
- Pass correct mode in vitest config function - by @adriencaccia in https://github.com/vitest-dev/vitest/issues/4399 (b8ca3)
- Throw an error if vitest is imported using require() - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4466 (e5cf1)
- Use correct type for defineProject to allow usage in mergeConfig - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4498 (7dee8)
- Throw an error if Vite wasn't able to resolve aliased path - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4503 (50333)
- Improve vi.waitUntil type to excude falsy types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4572 (23652)
- Add import-meta.d.ts - by @macdaddyaz in https://github.com/vitest-dev/vitest/issues/4571 (dd802)
- Correctly support CSS variable when using happy-dom - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4601 (9fbf3)
- Pass correct server options in workspace - by @hironytic in https://github.com/vitest-dev/vitest/issues/4539 and https://github.com/vitest-dev/vitest/issues/4540 (241a8)
- Independently mock each instance's methods for mocked class - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4564 (05b05)
-
vm:
- Remove sequencer usage from createVmThreadsPool function - by @mhogeveen in https://github.com/vitest-dev/vitest/issues/4638 (54d52)
🏎️ Performance
- Update
log-updatev9 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4390 (ba1df) - Close pool early in run-mode - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4623 (e0e20)
-
coverage-istanbul:
all: trueinstruments already instrumented files - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4552 (d1e1b)
View changes on GitHub
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.