Packages

@vitest/spy

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

Your version

138 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 3.x
  2. 3.1.0

    31 Mar 2025
    • Introduce %$ option to add number of the test to its title

    • Add diff.maxDepth option and set non-Infinity value as a default to reduce crash

    • Allow array element for test.each/for title formatting

  3. 3.0.9

    17 Mar 2025
    • Typings of ctx.skip() as never

    • Cleanup vitest in public resolveConfig API

    • Fix toHaveBeenCalledWith(asymmetricMatcher) with undefined arguments

  4. 3.0.8

    6 Mar 2025
    • Fix fetch cache multiple writes

    • Use browser.isolate instead of config.isolate

    • Remove vestigial spy stub, import directly from @vitest/spy

  5. 3.0.7

    24 Feb 2025
    • browser: Support webdriverio 9

    • deps: Update all non-major dependencies - in #7543

    • expect: Correct generic MatchersObject this type in expect.extend

  6. 3.0.6

    18 Feb 2025
    • Fix getMockedSystemTime for useFakeTimer

    • Compat for jest-image-snapshot

    • Ensure project names are readable in dark terminals

  7. 3.0.5

    3 Feb 2025
  8. 3.0.4

    23 Jan 2025
  9. 3.0.3

    21 Jan 2025
    • browser: Don't throw a validation error if v8 coverage is used with filtered instances

    • browser: Don't fail when running --browser.headless if the browser projest is part of the workspace

    • reporters: Update summary only when needed

  10. 3.0.2

    17 Jan 2025
    • Don't await an empty timeout after every test

    • expect: Fix expect().resolves/rejects chain typings

  11. 3.0.1

    16 Jan 2025
    • Revert "fix: re-apply default conditions if using vite 6 or later (#7071)"

    • deps: Update all non-major dependencies

  12. 3.0.0

    16 Jan 2025
    • breaking

      spy.mockReset changes

    • breaking

      Pass down context to test hooks

    • breaking

      Support Vite 6

  13. 2.x
  14. 2.1.8

    2 Dec 2024
    • Support Node 21

  15. 2.1.7

    2 Dec 2024
    • Revert support for Vite 6

  16. 2.1.6

    26 Nov 2024
    • Support Vite 6

  17. 2.1.5

    13 Nov 2024
    • removed

      ui: Remove crossorigin attributes for same origin assets

    • dangerouslyIgnoreUnhandledErrors without base reporter

    • Capture unhandledRejection even when base reporter is not used

  18. 2.1.4

    28 Oct 2024
    • browser: Allow custom HTML path, respect plugins transformIndexHtml

    • windows: Don't normalize drive case letter in root

    • browser: Fix default browser port

  19. 2.1.3

    14 Oct 2024
    • deprecated

      vitest: Deprecate UserConfig in favor of ViteUserConfig

    • deprecated

      vitest: Deprecate old task types and node-reliant types

    • Fix error diff of toBeNaN, toBeUndefined, toBeNull, toBeTruthy, toBeFalsy

  20. 2.1.2

    2 Oct 2024
    • Move Vitest.setServer to post configureServer hook to enable import analysis for workspace config loading

    • benchmark: Clear BenchmarkResult.samples array to reduce memory usage

    • browser: Fix dynamic import inside worker

  21. 2.1.1

    13 Sep 2024
    • browser: Make example test callbacks async

    • browser: Optimize vitest-browser-vue correctly

    • workspace: Resolve glob pattern once to avoid name collision

  22. 2.1.0

    12 Sep 2024
    • breaking

      workspace: Correctly resolve workspace globs and file paths

    • breaking

      workspace: 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.ts or vite.config.ts inside the folder)

    • breaking

      workspace: For example, projects/* will match anything inside the projects folder. 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.

  23. 2.0.5

    31 Jul 2024
    • Introduce experimental reported tasks

    • Show a difference between string characters if both values are strings

    • testNamePattern adds leading space

  24. 2.0.4

    22 Jul 2024
    • One-line environment options

    • Resolve assets imported with require

    • browser: Don't panic if @vitest/browser is installed outside of project root

  25. 2.0.3

    15 Jul 2024
    • ui: Show all suites/tests when parent matches

    • --inspect-brk stop on Windows

    • browser: Don't import from "vite"

  26. 2.0.2

    10 Jul 2024
    • browser: Remove @vitest/runner > pretty-format from prebundling because it doesn't exist

    • browser: Inline pretty-format and replace picocolors with tinyrainbow

    • browser: Remove crypto.randomUUID from the client

  27. 2.0.1

    8 Jul 2024
    • browser: Correctly inherit browser config in a workspace

    • ui: Move virtual scroller to dev dependencies

    • vitest: Print only running files, not every file

  28. 2.0.0

    8 Jul 2024
    • breaking

      Simplify mock function generic types and align with jest - by @hi-ogawa

    • breaking

      Remove --segfault-retry

    • breaking

      Run suite hooks in a stack

  29. 1.x
  30. 1.6.1

    3 Feb 2025

    Reading the note…

  31. 1.6.0

    3 May 2024
    • Support standalone mode

    • Custom "snapshotEnvironment" option

    • benchmark: Support comparing benchmark result

  32. 1.5.3

    30 Apr 2024

    Reading the note…

  33. 1.5.2

    25 Apr 2024

    Reading the note…

  34. 1.5.1

    24 Apr 2024

    Reading the note…

  35. 1.5.0

    11 Apr 2024
    • Add configuration for diff truncation

    • Remove unrelated noise from diff for toMatchObject()

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

  36. 1.4.0

    15 Mar 2024
    • deprecated

      config: Deprecate cache.dir option

    • Throw error when using snapshot assertion with not

    • Add a flag to include test location in tasks

  37. 1.3.1

    20 Feb 2024

    Reading the note…

  38. 1.3.0

    16 Feb 2024
    • deprecated

      Deprecate watchExclude

    • browser: Run test files in isolated iframes

    • config: Add snapshotSerializers option

  39. 1.2.2

    26 Jan 2024

    Reading the note…

  40. 1.2.1

    17 Jan 2024

    Reading the note…

  41. 1.2.0

    12 Jan 2024
    • Support case-insensitive path matching in cli

    • Add typeahead search

    • Add syntax highlighting to error messages

  42. 1.1.3

    5 Jan 2024

    Reading the note…

  43. 1.1.2

    4 Jan 2024

    Reading the note…

  44. 1.1.1

    31 Dec 2023

    Reading the note…

  45. 1.1.0

    19 Dec 2023
    • Add es-main compatibility to vite-node

    • Add --workspace option, fix root resolution in workspaces

    • Add --no-file-parallelism, --maxWorkers, --minWorkers flags

  46. 1.0.4

    9 Dec 2023

    Reading the note…

  47. 1.0.3

    9 Dec 2023

    Reading the note…

  48. 1.0.2

    7 Dec 2023

    Reading the note…

  49. 1.0.1

    4 Dec 2023

    Reading the note…

  50. 1.0.0

    4 Dec 2023
    • breaking

      Add support for pool and poolOptions, remove old flags

    • breaking

      Support multiple parallel child_process

    • breaking

      Make snapshots more visually pleasing

  51. 0.34.x
  52. 0.34.7

    2 Oct 2023

    Reading the note…

  53. 0.34.6

    29 Sep 2023

    Reading the note…