Packages

vitest

5.1.1 · 18 Nov 2026MIT194M / weekRepositoryHomepagenpmAtom feed

Your version

5.0.0

major3 Sep 2026

5.1.1 is the newest release of 5.x.

In short

35 breaking

  • Breaking

    Replace loupe.inspect with pretty-format

  • Breaking

    Remove quotes from string values in test.for/each title $ variable (take 2)

  • Breaking

    Default attachmentsDir from .vitest-attachements/ to .vitest/attachments/

  • Breaking

    Remove sequential test/suite options in favor of concurrent

  • Breaking

    Represent locator as an object instead of a string

  • Breaking

    Inline expect package

  • Breaking

    Remove deprecated entry points

  • Breaking

    Require Node.js 22 and Vite 6.4

Release note

Vitest 5 is officially out! This release focuses on performance and brings a lot of new features while fixing long-standing bugs. See our blog post for the official announcement.

Breaking Changes

  • Breaking

    Replace loupe.inspect with pretty-format

  • Breaking

    Remove quotes from string values in test.for/each title $ variable (take 2)

  • Breaking

    Default attachmentsDir from .vitest-attachements/ to .vitest/attachments/

  • Breaking

    Remove sequential test/suite options in favor of concurrent

  • Breaking

    Represent locator as an object instead of a string

  • Breaking

    Inline expect package

  • Breaking

    Remove deprecated entry points

  • Breaking

    Require Node.js 22 and Vite 6.4

  • Breaking

    Fail expect.poll when function didn't resolve in time

  • Breaking

    Throw an error if hoistable methods are outside the top level scope

  • Breaking

    toHaveTextContent is strict, add toMatchTextContent as alternative

  • Breaking

    Don't lookup config file from ancestor directories

  • Breaking

    Inline @vitest/runner package, do not publish it anymore

  • Breaking

    Allow mutating happy-dom/jsdom window object

  • Breaking

    Expose concurrencyId/workerId on TestModule's diagnostics, make id 1-based

  • Breaking

    Add screenshotDirectory config to browser.expect.toMatchScreenshot

  • Breaking

    Update @sinonjs/fake-timers and support mocking Temporal

  • Breaking

    Remove webdriverio package

  • Breaking

    Clear mocks by default before each test

  • Breaking

    Don't emit localStorage warnings on Node 26, fail gracefully when worker fails to start

  • Breaking

    Separate config resolution from the server creation

  • Breaking

    Inline projects extend the root config by default

  • Breaking

    Enable mocking Temporal without fake timers

  • Breaking

    Support nested projects

  • Breaking

    Use > as separator in -t, calculate only once

  • Breaking

    Fail the test when an asynchronous assertion is not awaited

  • Breaking

    Share the Vite server between inline projects

  • Breaking

    Parse files statically in vitest list by default

  • Breaking

    benchmark: Rewrite the public API

  • Breaking

    browser: Iframe scale

  • Breaking

    browser: Enable locators.exact by default

  • Breaking

    browser: Require sessionId for orchestrator html request

  • Breaking

    browser: Save failure screenshots in attachmentsDir

  • Breaking

    coverage: include/exclude globs too eager

  • Breaking

    coverage: Allow thresholds.perFile to accept an object

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.