Packages

@vitest/spy

5.0.5 · 15 Oct 2026MIT202.7M / weekRepositoryHomepagenpmAtom feed

Your version

1.5.0

11 Apr 2024Where it was published

1.6.1 is the newest release of 1.x.

In short

4 new18 fixed

Release note

Features

  • Add configuration for diff truncation

  • Remove unrelated noise from diff for toMatchObject()

  • Allow custom host for --inspect and --inspect-brk

  • coverage: V8 to ignore empty lines, comments, types

Bug Fixes

  • describe calls not taking generic type parameters

  • Prevent hang when process is mocked

  • Don't check for "node:internal/console/" in console interceptor in case the environment is not Node.js

  • The value received by toMatch should be a string

  • Increase stack trace limit for location, don't hardcode suite position

  • benchmark: Run benchmark suites sequentially

  • benchmark: Fix benchmark summary of single bench suite

  • benchmark: Table reporter for non TTY output

  • expect: Fix toHaveBeenNthCalledWith error message when not called

  • types: Pass correct type for suite factory

  • utils: Fix object diff with getter only property

  • vite-node: Fix isValidNodeImport to check "type": "module" first

  • vitest: Correctly send console events when state changes

  • vitest: Initiate FakeTimers on demand

  • vitest: Check unhighlighted code for code frame line limit

  • vitest: Correctly filter by parent folder

  • vitest: Close inspector immediately if run is canceled

  • workspace: Set CWD to config directory, allow overriding local .env