Vitest Release Notes

Last updated: Jan 14, 2026

  • Jan 14, 2026
    • Parsed from source:
      Jan 14, 2026
    • Detected by Releasebot:
      Jan 14, 2026
    Vitest logo

    Vitest

    v4.1.0-beta.1

    This release delivers a broad testing toolkit upgrade with new APIs and browser features, improved timer controls, and smarter test runs. It adds wheel events, test file runs, spec filters, and hooks while tightening coverage and fixing key issues.

    Features

    • Return a disposable from doMock() - by @kirkwaiblinger in #9332 (e3e65)
    • Added chai style assertions for spying - by @ronnakamoto and @sheremet-va in #8842 (841df)
    • Update to sinon/fake-timers v15 and add setTickMode to timer controls - by @atscott and @sheremet-va in #8726 (4b480)

    api:

    • Support tests starting or ending with test in experimental_parseSpecification - by @jgillick and Jeremy Gillick in #9235 (2f367)
    • Add filters to createSpecification - by @sheremet-va in #9336 (c8e6c)
    • Expose runTestFiles as alternative to runTestSpecifications - by @sheremet-va in #9443 (43d76)

    browser:

    • Add userEvent.wheel API - by @macarie in #9188 (66080)

    coverage:

    • Support ignore start/stop ignore hints - by @AriPerkkio in #9204 (e59c9)

    experimental:

    • Add onModuleRunner hook to worker.init - by @sheremet-va in #9286 (e977f)

    runner:

    • Enhance retry options - by @MazenSamehR, Matan Shavit, @AriPerkkio and @sheremet-va in #9370 (9e4cf)

    🐞 Bug Fixes

    • Deprecate several vitest/* entry points - by @sheremet-va in #9347 (fd459)
    • Use meta.url in createRequire - by @sheremet-va in #9441 (e3422)
    • Preact browser mode init example of render function not async - by @WuMingDao in #9375 (2bea5)
    • browser: Avoid updating screenshots when toMatchScreenshot passes - by @macarie in #9289 (46aab)
    • coverage: Infer transform mode for uncovered files - by @AriPerkkio in #9435 (f3967)
    • deps: Update all non-major dependencies - by @hi-ogawa in #9192 (90c30)

    View changes on GitHub

    Original source Report a problem
  • Jan 12, 2026
    • Parsed from source:
      Jan 12, 2026
    • Detected by Releasebot:
      Jan 13, 2026
    Vitest logo

    Vitest

    v4.0.17

    New experimental features boost browser OpenTelemetry, env propagation, and runtime stability while a sweep of bug fixes tightens errors, file handling, mocks, and runner behavior for more reliable tests and builds.

    🚀 Experimental Features

    • Support openTelemetry for browser mode - by @hi-ogawa in #9180 (1ec3a)
    • Support TRACEPARENT and TRACESTATE environment variables for OpenTelemetry context propagation - by @Copilot, hi-ogawa and @hi-ogawa in #9295 (876cb)

    🐞 Bug Fixes

    • Improve asymmetric matcher diff readability by unwrapping container matchers - by @Copilot, sheremet-va, hi-ogawa and @hi-ogawa in #9330 (b2ec7)
    • Improve runner error when importing outside of test context - by @sheremet-va in #9335 (2dd3d)
    • Replace crypto.randomUUID to allow insecure environments (fix #9… - by @plusgut in #9339 and #9 (e6a3f)
    • Handle null options in addEventHandler #9371 - by @ThibautMarechal in #9372 and #9371 (40841)
    • Typo in browser.provider error - by @deammer in #9394 (4b67f)

    browser:

    • Fix process.env and import.meta.env defines in inline project - by @hi-ogawa in #9239 (b70c9)
    • Fix upload File instance - by @hi-ogawa in #9294 (b6778)
    • Fix invalid project token for artifacts assets - by @hi-ogawa in #9321 (caa7d)
    • Log ErrorEvent.message when unhandled ErrorEvent.error is null - by @hi-ogawa in #9322 (5d84e)
    • Support fileParallelism on an instance - by @sheremet-va in #9328 (15006)

    coverage:

    • Remove unnecessary istanbul-lib-source-maps usage - by @AriPerkkio in #9344 (b0940)
    • Apply patch from istanbuljs/istanbuljs#837 - by @AriPerkkio and sapphi-red in #9413 and #837 (e05ce)

    fsModuleCache:

    • Don't store importers in cache - by @sheremet-va in #9422 (75136)
    • Add importers alongside importedModules - by @sheremet-va in #9423 (59f92)

    mocker:

    • Fix mock transform with class - by @hi-ogawa in #9421 (d390e)

    pool:

    • Validate environment options when reusing the worker - by @sheremet-va in #9349 (a8a88)
    • Handle worker start failures gracefully - by @AriPerkkio in #9337 (200da)

    reporter:

    • Report test module if it failed to run - by @sheremet-va in #9272 (c7888)

    runner:

    • Respect nested test.only within describe.only - by @Ujjwaljain16 in #9021 and #9213 (55d5d)

    typecheck:

    • Improve error message when tsc outputs help text - by @Ujjwaljain16 in #9214 (7b10a)

    ui:

    • Detect gzip by magic numbers instead of Content-Type header in html reporter - by @Copilot, hi-ogawa and @hi-ogawa in #9278 (dd033)

    webdriverio:

    • Fall back to WebDriver Classic #9244 - by @JustasMonkev in #9373 and #9244 (c23dd)

    View changes on GitHub

    Original source Report a problem
  • Dec 16, 2025
    • Parsed from source:
      Dec 16, 2025
    • Detected by Releasebot:
      Dec 17, 2025
    Vitest logo

    Vitest

    v4.0.16

    ViTest delivers a focused bug fix release that smooths browser mode, improves stability, and tightens import handling. It fixes default test timeouts, prevents crashes, enhances dynamic imports, and polishes the module graph and console reporting.

    🐞 Bug Fixes

    • Fix browser mode default testTimeout back to 15 seconds - by @hi-ogawa in #9167 (da0ad)
    • Avoid crashing on process.versions stub - by @AriPerkkio in #9174 (78cfb)
    • Reject calling suite function inside test - by @hi-ogawa in #9198 (1a259)
    • Allow inlining fully dynamic import - by @hi-ogawa in #9137 (56851)
    • Fix module graph UI on html reporter with headless browser mode - by @hi-ogawa in #9219 (60642)
    • Log deprecated test.poolOptions if it's set - by @sheremet-va in #9226 (f7f6a)
    • View changes on GitHub

    browser:

    • Import recordArtifact from the vitest package - by @macarie in #9186 (01c56)
    • Fix import.meta.env define - by @hi-ogawa in #9205 (01a9a)
    • String formatting bug when including placeholders in console.log - by @michael-debs and @hi-ogawa in #9030 and #9131 (84a30)

    coverage:

    • Istanbul untested files source maps are off - by @AriPerkkio in #9208 (372e8)

    experimental:

    • Export setupEnvironment for custom pools - by @AriPerkkio in #9187 (5d26b)

    • View changes on GitHub

    Original source Report a problem
  • Dec 2, 2025
    • Parsed from source:
      Dec 2, 2025
    • Detected by Releasebot:
      Dec 12, 2025
    Vitest logo

    Vitest

    v4.0.15

    A broad release brings experimental features cache opt-out, cache fixes, and many bug fixes across reporters, browser tests, dependencies, docs, and web workers. It signals actual shipped updates and improvements for users.

    🚀 Experimental Features

    • cache: Add opt-out on a plugin level, fix internal root cache - by @sheremet-va in #9154 (a68f7)
    • reporters: Print import duration breakdown - by @sheremet-va in #9105 (122ff)

    🐞 Bug Fixes

    • Keep built-in id as is in bun and deno - by @sheremet-va in #9117 (075ab)
    • Use optimizeDeps.rolldownOptions to fix depreated warning + fix ssr.external: true - by @hi-ogawa in #9121 (fd8bd)
    • Fix external behavior with deps.optimizer - by @hi-ogawa in #9125 (4c754)
    • Very minor typo in "Chrome DevTools Protocol" - by @HowToTestFrontend in #9146 (20997)
    • browser: Run toMatchScreenshot only once when used with expect.element - by @macarie in #9132 (0d2e7)
    • coverage: Istanbul provider to not break source maps - by @AriPerkkio in #9040 (e4ca9)
    • deps: Update dependency tinyexec to v1 - in #9122 (fd786)
    • docs: Remove --browser.provider from docs - by @sheremet-va in #9115 (120b3)
    • expect: Preserve currentTestName in extended matchers - by @macarie in #9106 (e4345)
    • pool: Terminate workers on CTRL+c forceful exits - by @AriPerkkio in #9140 (d57d8)
    • reporters: Show project in github reporter - by @sheremet-va in #9138 (bb65e)
    • spy: Do not mock overriden method, if parent was automocked - by @sheremet-va in #9116 (1a246)
    • web-worker: MessagePort objects passed to Worker.postMessage work when clone === "native" - by @whitphx in #9118 (deee8)

    View changes on GitHub

    Original source Report a problem
  • Nov 25, 2025
    • Parsed from source:
      Nov 25, 2025
    • Detected by Releasebot:
      Dec 12, 2025
    Vitest logo

    Vitest

    v4.0.14

    New features and fixes shipped in this release with a focus on safer DOM tooling, faster runtimes and better debugging. Highlights include a tabbed failure view, pretty DOM utilities, and performance improvements across browser, jsdom and web workers. See GitHub for full changes.

    🚀 Experimental Features

    • browser: Expose utils.configurePrettyDOM - by @sheremet-va in #9103 (2cc34)
    • runner: Add full names to tasks - by @macarie in #9087 (821aa)
    • ui: Add tabbed failure view for toMatchScreenshot with comparison slider - by @macarie in #8813 (c37c2)

    🐞 Bug Fixes

    • Externalize before caching - by @sheremet-va in #9077 (e1b2e)

    • Collect the duration of external imports - by @sheremet-va in #9097 (3326c)

    • Rename collect to import, remove prepare - by @sheremet-va in #9091 (1256b)

    • browser:

      • Unsubscribe onCancel on rpc destroy - by @AriPerkkio in #9088 (f5b72)
      • Revert the viewport scaling in non-ui mode #9018 - by @sheremet-va in #9072 and #9018 (64502)
    • coverage:

      • Invalidate circular modules correctly on rerun with coverage - by @aicest in #9096 (6f22c)
    • expect:

      • Allow function as standard schema - by @hi-ogawa in #9099 (ed8a2)
    • jsdom:

      • Reuse abort signals if possible - by @sheremet-va in #9090 (2c468)
    • pool:

      • Init VITEST_POOL_ID + VITEST_WORKER_ID before environment setup - by @AriPerkkio in #9085 (37918)
    • web-worker:

      • postMessage to send ports to workers - by @whitphx and @AriPerkkio in #9078 (9d176)

    🏎 Performance

    • Replace debug with obug - by @sxzz and @AriPerkkio in #9057 (acc51)

    • View changes on GitHub

    Original source Report a problem
  • Nov 21, 2025
    • Parsed from source:
      Nov 21, 2025
    • Detected by Releasebot:
      Dec 12, 2025
    Vitest logo

    Vitest

    v4.0.13

    🐞 Bug Fixes

    types:

    • Don't use type from Vite 7.1 - by @sheremet-va in #9071 (6356b)
    • Don't import node.js dependent types in vitest/browser - by @sheremet-va in #9068 (332af)

    🏎 Performance

    • Avoid fetchModule roundtrip if the module is cached - by @sheremet-va in #9075 (b27e0)
    • experimental: If fsCacheModule is enabled, read from the memory when possible - by @sheremet-va in #9076 (6b9a1)

    View changes on GitHub

    Original source Report a problem
  • Nov 20, 2025
    • Parsed from source:
      Nov 20, 2025
    • Detected by Releasebot:
      Dec 12, 2025
    Vitest logo

    Vitest

    v4.0.12

    🐞 Bug Fixes

    • Inherit fsModuleCachePath by default - by @sheremet-va in #9063 (9a8bc)
    • Don't import from @opentelemetry/api in public types - by @sheremet-va in #9066 (e944a)

    View changes on GitHub

    Original source Report a problem
  • Nov 20, 2025
    • Parsed from source:
      Nov 20, 2025
    • Detected by Releasebot:
      Dec 12, 2025
    Vitest logo

    Vitest

    v4.0.11

    Experimental Features

    Performance

    Original source Report a problem
  • Nov 17, 2025
    • Parsed from source:
      Nov 17, 2025
    • Detected by Releasebot:
      Dec 12, 2025
    Vitest logo

    Vitest

    v4.0.10

    New release brings a wave of bug fixes across core, UI and reporters. It sharpens stability with safer cancellations, accurate test durations, better stack traces, and UI iframe scaling when disabled, boosting performance and reliability.

    🐞 Bug Fixes

    browser

    • Don't scale the iframe if UI is disabled - by @sheremet-va in #9018 (5406e)
    • Handle dependency stack traces with external source maps. Resolves: #9003 - by @iclectic in #9016 and #9003 (57ae5)

    bun

    • Parsing of stack trace for bun runtime - by @nazarhussain in #9032 (f3ec6)

    core

    • Prevent starting new run when cancelling - by @AriPerkkio in #8991 (eb98d)

    pool

    • Prevent writing to closed worker - by @AriPerkkio and @sheremet-va in #9023 (042c6)

    reporters

    • Report correct test run duration at the end - by @sheremet-va in #8969 (bc3a6)

    ui

    • Use execution time from ws reporter (onFinished) - by @userquin in #8975 (f56dc)

    View changes on GitHub

    Original source Report a problem
  • Nov 14, 2025
    • Parsed from source:
      Nov 14, 2025
    • Detected by Releasebot:
      Dec 12, 2025
    Vitest logo

    Vitest

    v4.0.9

    🚀 Experimental Features

    • expect: Add Set support to toBeOneOf - by @tim-we and @sheremet-va in #8906 (a415d)

    🐞 Bug Fixes

    • browser: Add favicon icons to the browser mode ui - by @userquin in #8972 (353ee)
    • forks: Increase worker start timeout - by @AriPerkkio in #9027 (5e750)
    • jsdom: Cloned request is an instance of Request - by @sheremet-va in #8985 (506a9)
    • ui: Collect file/suite/test duration correctly - by @userquin in #8976 (8016d)

    View changes on GitHub

    Original source Report a problem

Related vendors