Packages

@vitest/mocker

5.1.0 · 2 Nov 2026MIT190.8M / weekRepositoryHomepagenpmAtom feed

Your version

3.2.0

2 Jun 2025Where it was published

3.2.7 is the newest release of 3.x.

In short

1 deprecated10 new9 fixed

  • Deprecated

    Deprecate workspace in favor of projects

Security

2 advisories affect 3.2.0; 4.1.12 fixes them

Release note

The section about @vitest/mocker of a note shared by several packages.

Features

  • Provide ctx.signal

  • Support custom colors for test.name

  • Add vi.mockObject to automock any object

  • Introduce watchTriggerPatterns option

  • Deprecated

    Deprecate workspace in favor of projects

  • Explicit Resource Management support in mocked functions

  • Add sequence.groupOrder option

  • Initial support for Temporal equality

  • Support Vite 7

  • Track module execution totalTime and selfTime

  • Annotation API

Bug Fixes

  • Replace micromatch with picomatch

  • Try to catch unhandled error outside of a test

  • Generate a separate config for "vitest init browser" instead of a workspace file

  • Switch ExpectStatic any types to AsymmetricMatcher<unknown>, with DeeplyAllowMatchers<T>

  • Remove unused exports

  • Throw an error if typechecker failed to spawn

  • Ignore non-string stack properties

  • Apply browser CLI options only if the project has the browser set in the config already

  • Ensure errors keep their message and stack after toJSON serialisation

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.