PackageTrack

npm ยท #3828

@vitest/browser

4.1.11vitest-dev/vitest โ†—

Browser running for Vitest

Release timeline

233 releases since 2022
2023202420252026

Releases

  1. 2.0.18 Jul 2024
    Release notes

       ๐Ÿž Bug Fixes

    • browser: Correctly inherit browser config in a workspace  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6054 <samp>(4b03e)</samp>
    • ui: Move virtual scroller to dev dependencies  -  by @userquin in https://github.com/vitest-dev/vitest/issues/6053 <samp>(f94ed)</samp>
    • vitest: Print only running files, not every file  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6052 <samp>(4d559)</samp>
        View changes on GitHub
    Open source โ†’
  2. 2.0.08 Jul 2024
    Release notes

    Vitest 2.0 is here! This release page lists all changes made to the project during the beta. For the migration guide, please refer to the documentation.

    ๐Ÿšจ Breaking Changes

    • Simplify mock function generic types and align with jest - by @hi-ogawa in https://github.com/vitest-dev/vitest/pull/4784 <samp>(a0c1d37)</samp>
    • Remove --segfault-retry - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5514 <samp>(ed60e)</samp>
      • This flag was introduced to combat threads segfaults. Our current recommendation is to use the new default forks pool instead.
    • Run suite hooks in a stack - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5609 <samp>(1277d)</samp>
      • This feels like a more sensible default. Especially with the new onTestFinished hook. This can make your tests run a little bit slower.
    • Enable coverage.ignoreEmptyLines by default - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5543 <samp>(31994)</samp>
      • โš ๏ธ This change may cause significant differences in your coverage results compared to Vitest v1. These changes are expected as coverage reporting is now more accurate. See https://github.com/vitest-dev/vitest/issues/5423 for more details.
    • Add correct location and snapshot fields in json reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5434 <samp>(bcccc)</samp>
      • Previously, the location field pointed to the error location instead of the test location. Now it is aligned with jest and contains the line and column of a test function, but requires includeTaskLocation to be enabled.
    • Update dependency chai to v5 - by renovate[bot] and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5135 <samp>(73646)</samp>
    • Remove watchExclude - by @patak-dev in https://github.com/vitest-dev/vitest/issues/5177 <samp>(d7371)</samp>
    • Change default pool to 'forks' - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5047 <samp>(7f8f9)</samp>
      • This change is done for compatibility issues
      • This pool may be slightly slower than previous threads pool: https://vitest.dev/guide/improving-performance.html#pool
    • --merge-reports to support coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5736 <samp>(b7438)</samp>
    • Add promise-based return assertions, do not auto-resolve returned promises - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5749 <samp>(5f710)</samp>
      • โš ๏ธ Vitest no longer unwraps promises in spy.mock.returns. If the function is async or returns a promise, it will always succeed and have a Promise in results. To make migration easier, we introduced spy.mock.settledResults that unwraps promises and expect().toHaveResolved() matcher that accepts unwrapped value.
    • Do not exit process if global setup has failed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5726 <samp>(ddb09)</samp>
    • Don't exit process if config failed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5715 <samp>(f232f)</samp>
    • Add meta to json output - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5802 <samp>(dd754)</samp>
    • Rename indexScripts to orchestratorScripts in the browser config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5842 <samp>(49f34)</samp>
    • Add "vitest list" API to print collected tests without running them - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6013 <samp>(583dd)</samp>
      • โš ๏ธ This changes the custom pool API - now requires collectTests method alongside runTests.
    • Remove the empty suite from the runner - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5435 <samp>(dbbbe)</samp>
    • Support concurrent suites - by @hi-ogawa in https://github.com/vitest-dev/vitest/pull/5491 <samp>(222ce44)</samp>
    • Support overriding exclude in coverage - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5997 <samp>(169bc)</samp>
      • โš ๏ธ Vitest coverage no longer adds test files to exclude patterns if coverage.exclude was overridden in the config. Add your test patterns manually, or merge your overrides with default ones: ['**/my-pattern.js', ...coverageConfigDefaults.exclude]. See https://vitest.dev/config/#coverage-exclude for an example.
    • api:
      • Remove process.exit if workspace project failed to be created - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5804 <samp>(a820e)</samp>
      • Don't call process.exit manually - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5926 <samp>(e9b63)</samp>

    ๐Ÿš€ Features

    <img width="1392" alt="Running tresjs example in Vitest BrowserMode" src="https://github.com/vitest-dev/vitest/assets/16173870/3b6bc721-b194-416d-a685-cf7282ee802a">

    • browser:
      • ๐ŸŒ This release lays the groundwork for the next iteration of Vitest Browser Mode. You can read more about our future plans at https://github.com/vitest-dev/vitest/discussions/5828
      • Add commands to communicate betweens server and the browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5097 <samp>(aa431)</samp>
      • Do not reload the page during watch mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5810 <samp>(e5b9a)</samp>
      • Support changing the viewport - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5811 <samp>(71851)</samp>
      • Add browser iframe mouse interaction - by @userquin in https://github.com/vitest-dev/vitest/issues/5815 <samp>(f29b9)</samp>
      • Support click event - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5777 <samp>(839c3)</samp>
      • Rename none provider to preview, make it default - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5826 <samp>(18310)</samp>
      • Run tests in parallel in headless mode, add page.screenshot method - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5853 <samp>(81c42)</samp>
      • Implement several userEvent methods, add fill and dragAndDrop events - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5882 <samp>(4dbea)</samp>
      • Introduce expect.dom method and bundle jest-dom matchers with @vitest/browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5910 <samp>(3a96a)</samp>
      • Expose CDP in the browser - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5938 <samp>(bec43)</samp>
      • Add "init" command for browser tests - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5960 <samp>(49e97)</samp>
      • Add an option to take screenshots if the browser test fails - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5975 <samp>(154cb)</samp>
      • Add tripleClick to interactive api - by @userquin in https://github.com/vitest-dev/vitest/issues/5987 <samp>(200a4)</samp>
      • Playwright provider doesn't allow resizing the browser viewport - by @userquin and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5984 <samp>(ff978)</samp>
    • Pretty print diffs coming from cause - by @dubzzz in https://github.com/vitest-dev/vitest/issues/5660 <samp>(6faf8)</samp>
    • Allow import statement as vi.mock path for better IDE support - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5690 <samp>(a99a1)</samp>
    • Remove deprecated options - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5696 <samp>(5c308)</samp>
    • Add blob reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5663 <samp>(e2053)</samp>
      • โœ… Run Vitest in separate processes with --reporter=blob flag to generate reports and combine them with vitest --merge-reports later!
    • Add expect.poll utility - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5708 <samp>(e2e0f)</samp>
    • Add browser.ui option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5771 <samp>(a5033)</samp>
    • Add median to --output-json - by @Joristdh in https://github.com/vitest-dev/vitest/issues/5745 <samp>(0766b)</samp>
    • Allow augmenting config.test.env - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5784 <samp>(b2469)</samp>
    • Implement module mocking in browser mode - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5765 <samp>(7b2f6)</samp>
    • Allow configuring expect options in the config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5729 <samp>(fc53f)</samp>
    • Add an option to print console stack trace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5720 <samp>(e4fe6)</samp>
    • Add browser frame to UI - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5808 <samp>(3796d)</samp>
    • Image type add bmp - by btea in https://github.com/vitest-dev/vitest/issues/5921 <samp>(98f9b)</samp>
    • Add an option to return base64 from page.screenshot - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5993 <samp>(be323)</samp>
    • Expose parseAst, parseAstAsync from vite - by @sheremet-va <samp>(f645e)</samp>
    • config:
      • Allow percentage value for workers option - by @syi0808 in https://github.com/vitest-dev/vitest/issues/5982 <samp>(b1a27)</samp>
    • runner:
      • Implement test.for - by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5861 <samp>(c2380)</samp>
    • spy:
      • Collect mock.contexts - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5955 <samp>(3b31a)</samp>
    • ui:
      • Render tests in a tree - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5807 <samp>(7900f)</samp>
      • Load module graph on tab selection - by @userquin in https://github.com/vitest-dev/vitest/issues/5844 <samp>(b117e)</samp>
      • Replace navigation tree with test explorer - by @userquin in https://github.com/vitest-dev/vitest/issues/5907 <samp>(45dfc)</samp>
      • Add initializing explorer logic - by @userquin in https://github.com/vitest-dev/vitest/issues/5941 <samp>(c31c4)</samp>
      • Add action to explorer item to show the test/suite line in the source code tab - by @userquin and Anjorin Damilare in https://github.com/vitest-dev/vitest/issues/5948 <samp>(7ec29)</samp>
    • ws-client:
      • Allow change reactive for state, filesMap and idMap - by @userquin in https://github.com/vitest-dev/vitest/issues/5906 <samp>(e6020)</samp>

    ๐Ÿž Bug Fixes

    • Print console statements in vmThreads - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5678 <samp>(34a80)</samp>
    • Repeatable --exclude option - by @fregante in https://github.com/vitest-dev/vitest/issues/5782 <samp>(d6700)</samp>
    • Remove browser.fileParallelism - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5790 <samp>(b881e)</samp>
    • Install UI icons - by @sheremet-va <samp>(b84f1)</samp>
    • Vi.waitFor/vi.waitUntil interval is now cleared after it times out - by @pedro00dk in https://github.com/vitest-dev/vitest/issues/5875 <samp>(04107)</samp>
    • ToJSON recursive error serialization - by @eddienubes in https://github.com/vitest-dev/vitest/issues/5848 and https://github.com/vitest-dev/vitest/issues/5884 <samp>(8d55d)</samp>
    • Print error properties only in verbose reporter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5917 <samp>(2bd8d)</samp>
    • Use TTY reporter when running in Deno - by @marvinhagemeister in https://github.com/vitest-dev/vitest/issues/5972 <samp>(e0f45)</samp>
    • Don't override uppercase - by @sheremet-va <samp>(caef4)</samp>
    • Clear screen and scrollback on iTerm2 - by @kxalex in https://github.com/vitest-dev/vitest/issues/5978 <samp>(d7f23)</samp>
    • Include pretty-format in @vitest/runner for optimization on npm - by @sheremet-va <samp>(42bd4)</samp>
    • Transpile esnext to node18 to support newest JS and TS features - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4409 <samp>(8f65a)</samp>
    • api:
      • Correct project.provide type - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5959 <samp>(0eda9)</samp>
    • browser:
      • Display UI - by @sheremet-va <samp>(d41e4)</samp>
      • Browser actions icons colors - by @userquin in https://github.com/vitest-dev/vitest/issues/5816 <samp>(f9d9b)</samp>
      • Restore the original viewport when unselecting the preset viewport - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5821 <samp>(5ebb3)</samp>
      • Don't get stuck after the manual page refresh - by @sheremet-va <samp>(2220b)</samp>
      • Use iframe id instead of calculating it from filenames - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5823 <samp>(34a31)</samp>
      • Always clean up iframes on rerun - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5827 <samp>(087fa)</samp>
      • Support @testing-library/vue in browser mode out of the box - by @sheremet-va <samp>(76b82)</samp>
      • Print correct transformed module graph - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5833 <samp>(a7581)</samp>
      • Use preview provider when running in StackBlitz - by @userquin in https://github.com/vitest-dev/vitest/issues/5836 <samp>(76e13)</samp>
      • Specify entries for correct deps optimization - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5839 <samp>(c79b3)</samp>
      • Allow iframe to load even if there is a custom CSP header - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5841 <samp>(caaaf)</samp>
      • Don't optimize Vitest dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5843 <samp>(f15b4)</samp>
      • Set server.open to false and move error handling after init - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5845 <samp>(47003)</samp>
      • Show correct prepare time - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5852 <samp>(52d54)</samp>
      • Resolve coverage.reporter from string values - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5920 <samp>(f33da)</samp>
      • Correctly update inline snapshot if changed - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5925 <samp>(2380c)</samp>
      • Remove "util" warning - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5935 <samp>(48f28)</samp>
      • Remove hacky retry - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5971 <samp>(2a2c9)</samp>
      • Make userEvent more stable when running in parallel - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5974 <samp>(14a21)</samp>
      • Print screenshot path alongside the test error message - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5992 <samp>(15289)</samp>
      • Print correct stack trace in source files - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6003 <samp>(62aa7)</samp>
      • Correctly mock optimized cjs dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6035 <samp>(057b4)</samp>
      • Support shadow root and svg elements - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6036 <samp>(2e3c8)</samp>
    • coverage:
      • Clean up empty coverage reports directory - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5731 <samp>(c469c)</samp>
      • thresholds.autoUpdate to support mergeConfig - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5818 <samp>(7afb3)</samp>
      • Pass thresholds errors to stderr of startVitest() - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5954 <samp>(70805)</samp>
      • Exclude bench files from coverage - by @kouak in https://github.com/vitest-dev/vitest/issues/5983 <samp>(429e1)</samp>
      • Vite to ignore dynamic import of provider - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5998 <samp>(6d884)</samp>
      • Istanbul to support import attributes - by @Gravitonic in https://github.com/vitest-dev/vitest/issues/6006 <samp>(2898a)</samp>
      • Remove work-around for implicit else - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6014 <samp>(368c1)</samp>
    • deps:
      • Update dependency @testing-library/dom to v10 - by renovate[bot] in https://github.com/vitest-dev/vitest/issues/5866 <samp>(e9745)</samp>
      • Update vulnerable test-exclude to v7 - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5867 <samp>(0a715)</samp>
    • expect:
      • Fix immutable.js iterable equality - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5692 <samp>(1532c)</samp>
    • forks:
      • Resolve poolOptions.<name>.isolate from forks options - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5840 <samp>(a60a1)</samp>
    • runner:
      • Ensure inner suite { sequential: true } correctly overrides outer suite { concurrent: true } - by @pengooseDev in https://github.com/vitest-dev/vitest/issues/5737 <samp>(a20e7)</samp>
      • Ensure test.each print -0 and -NaN properly - by @pengooseDev in https://github.com/vitest-dev/vitest/issues/5806 <samp>(9ac8f)</samp>
    • snapshot:
      • Fix toMatchFileSnapshot with empty file - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5894 <samp>(88006)</samp>
    • spy:
    • types:
      • Mark pool options as not available in project config - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5934 <samp>(486fd)</samp>
    • ui:
      • Show correct module graph and project name in a Vitest workspace - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5792 <samp>(48c50)</samp>
      • Update running todo tests inside todo suites (each) - by @userquin in https://github.com/vitest-dev/vitest/issues/5939 <samp>(63ae1)</samp>
      • FileDetails title status icon not being updated - by @userquin in https://github.com/vitest-dev/vitest/issues/5942 <samp>(e9ddf)</samp>
    • ui, browser:
      • Disable mouse events when resizing main navigation panel - by @userquin in https://github.com/vitest-dev/vitest/issues/5863 <samp>(7cbd9)</samp>
    • utils:
      • Produce valid snapshot names - by @dubzzz in https://github.com/vitest-dev/vitest/issues/5724 <samp>(1ec61)</samp>
      • Fix color util maximum call stack error - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5733 <samp>(a4ec5)</samp>
      • Package exports - by @userquin in https://github.com/vitest-dev/vitest/issues/5847 <samp>(07876)</samp>
    • vite-node:
      • Expose all envs from .env file, not just with a prefix VITE_ - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6017 <samp>(d87be)</samp>
    • vitest:
      • Expose provide to the public API - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5897 <samp>(66e64)</samp>
      • Cache fs code only for forks pool - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5909 <samp>(e30d9)</samp>
      • Allow testing unandled rejection/exception - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6016 <samp>(c8d56)</samp>
      • Show all failed tests when rerunning a test - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6022 <samp>(91ba6)</samp>
    View changes on GitHub
    Open source โ†’
  3. 2.0.0-beta.134 Jul 2024pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • vitest: Add "vitest list" API to print collected tests without running them  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6013 <samp>(583dd)</samp>
    • api:
      • Don't call process.exit manually  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5926 <samp>(e9b63)</samp>

       ๐Ÿš€ Features

    • Add an option to return base64 from page.screenshot  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5993 <samp>(be323)</samp>
    • Expose parseAst, parseAstAsync from vite  -  by @sheremet-va <samp>(f645e)</samp>
    • browser:
      • Add tripleClick to interactive api  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5987 <samp>(200a4)</samp>
      • Playwright provider doesn't allow resizing the browser viewport  -  by @userquin and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5984 <samp>(ff978)</samp>
    • config:
      • Allow percentage value for workers option  -  by @syi0808 in https://github.com/vitest-dev/vitest/issues/5982 <samp>(b1a27)</samp>
    • ui:
      • Add action to explorer item to show the test/suite line in the source code tab  -  by @userquin and @dammy001 in https://github.com/vitest-dev/vitest/issues/5948 <samp>(7ec29)</samp>

       ๐Ÿž Bug Fixes

    • Don't override uppercase  -  by @sheremet-va <samp>(caef4)</samp>
    • Clear screen and scrollback on iTerm2  -  by @kxalex in https://github.com/vitest-dev/vitest/issues/5978 <samp>(d7f23)</samp>
    • Include pretty-format in @vitest/runner for optimization on npm  -  by @sheremet-va <samp>(42bd4)</samp>
    • Transpile esnext to node18 to support newest JS and TS features  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4409 <samp>(8f65a)</samp>
    • browser:
      • Print screenshot path alongside the test error message  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5992 <samp>(15289)</samp>
      • Print correct stack trace in source files  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6003 <samp>(62aa7)</samp>
      • Correctly mock optimized cjs dependencies  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6035 <samp>(057b4)</samp>
      • Support shadow root and svg elements  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6036 <samp>(2e3c8)</samp>
    • coverage:
      • Exclude bench files from coverage  -  by @kouak in https://github.com/vitest-dev/vitest/issues/5983 <samp>(429e1)</samp>
      • Vite to ignore dynamic import of provider  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5998 <samp>(6d884)</samp>
      • Istanbul to support import attributes  -  by @Gravitonic in https://github.com/vitest-dev/vitest/issues/6006 <samp>(2898a)</samp>
      • Support overriding exclude  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5997 <samp>(169bc)</samp>
      • Remove work-around for implicit else  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/6014 <samp>(368c1)</samp>
    • vite-node:
      • Expose all envs from .env file, not just with a prefix VITE_  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6017 <samp>(d87be)</samp>
    • vitest:
      • Allow testing unandled rejection/exception  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6016 <samp>(c8d56)</samp>
      • Show all failed tests when rerunning a test  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/6022 <samp>(91ba6)</samp>
        View changes on GitHub
    Open source โ†’
  4. 2.0.0-beta.1225 Jun 2024pre-release
    Release notes

       ๐Ÿš€ Features

    • browser:
      • Introduce expect.dom method and bundle jest-dom matchers with @vitest/browser  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5910 <samp>(3a96a)</samp>
      • Expose CDP in the browser  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5938 <samp>(bec43)</samp>
      • Add "init" command for browser tests  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5960 <samp>(49e97)</samp>
      • Add an option to take screenshots if the browser test fails  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5975 <samp>(154cb)</samp>
    • spy:
      • Collect mock.contexts  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5955 <samp>(3b31a)</samp>
    • ui:
      • Replace navigation tree with test explorer  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5907 <samp>(45dfc)</samp>
      • Add initializing explorer logic  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5941 <samp>(c31c4)</samp>

       ๐Ÿž Bug Fixes

    • Use TTY reporter when running in Deno  -  by @marvinhagemeister in https://github.com/vitest-dev/vitest/issues/5972 <samp>(e0f45)</samp>
    • api:
      • Correct project.provide type  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5959 <samp>(0eda9)</samp>
    • browser:
      • Remove "util" warning  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5935 <samp>(48f28)</samp>
      • Remove hacky retry  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5971 <samp>(2a2c9)</samp>
      • Make userEvent more stable when running in parallel  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5974 <samp>(14a21)</samp>
    • coverage:
      • Pass thresholds errors to stderr of startVitest()  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5954 <samp>(70805)</samp>
    • types:
      • Mark pool options as not available in project config  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5934 <samp>(486fd)</samp>
    • ui:
      • Update running todo tests inside todo suites (each)  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5939 <samp>(63ae1)</samp>
      • FileDetails title status icon not being updated  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5942 <samp>(e9ddf)</samp>
        View changes on GitHub
    Open source โ†’
  5. 2.0.0-beta.1119 Jun 2024pre-release
    Release notes

       ๐Ÿš€ Features

    • Image type add bmp  -  by @btea in https://github.com/vitest-dev/vitest/issues/5921 <samp>(98f9b)</samp>
    • browser: Implement several userEvent methods, add fill and dragAndDrop events  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5882 <samp>(4dbea)</samp>
    • ws-client: Allow change reactive for state, filesMap and idMap  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5906 <samp>(e6020)</samp>

       ๐Ÿž Bug Fixes

    • ToJSON recursive error serialization  -  by @eddienubes in https://github.com/vitest-dev/vitest/issues/5848 and https://github.com/vitest-dev/vitest/issues/5884 <samp>(8d55d)</samp>
    • Print error properties only in verbose reporter  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5917 <samp>(2bd8d)</samp>
    • browser:
      • Resolve coverage.reporter from string values  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5920 <samp>(f33da)</samp>
      • Correctly update inline snapshot if changed  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5925 <samp>(2380c)</samp>
    • snapshot:
      • Fix toMatchFileSnapshot with empty file  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5894 <samp>(88006)</samp>
    • vitest:
      • Expose provide to the public API  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5897 <samp>(66e64)</samp>
      • Cache fs code only for forks pool  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5909 <samp>(e30d9)</samp>
        View changes on GitHub
    Open source โ†’
  6. 2.0.0-beta.1012 Jun 2024pre-release
    Release notes

       ๐Ÿš€ Features

    • browser: Run tests in parallel in headless mode, add page.screenshot method  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5853 <samp>(81c42)</samp>
    • runner: Implement test.for  -  by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5861 <samp>(c2380)</samp>
    • ui: Load module graph on tab selection  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5844 <samp>(b117e)</samp>

       ๐Ÿž Bug Fixes

    • Vi.waitFor/vi.waitUntil interval is now cleared after it times out  -  by @pedro00dk in https://github.com/vitest-dev/vitest/issues/5875 <samp>(04107)</samp>
    • browser:
      • Set server.open to false and move error handling after init  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5845 <samp>(47003)</samp>
      • Show correct prepare time  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5852 <samp>(52d54)</samp>
    • deps:
      • Update dependency @testing-library/dom to v10  -  by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/5866 <samp>(e9745)</samp>
      • Update vulnerable test-exclude to v7  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5867 <samp>(0a715)</samp>
    • forks:
      • Resolve poolOptions.<name>.isolate from forks options  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5840 <samp>(a60a1)</samp>
    • ui, browser:
      • Disable mouse events when resizing main navigation panel  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5863 <samp>(7cbd9)</samp>
    • utils:
      • Package exports  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5847 <samp>(07876)</samp>
        View changes on GitHub
    Open source โ†’
  7. 2.0.0-beta.95 Jun 2024pre-release
    Release notes

       ๐Ÿž Bug Fixes

    • browser: Don't optimize Vitest dependencies  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5843 <samp>(f15b4)</samp>
        View changes on GitHub
    Open source โ†’
  8. 2.0.0-beta.84 Jun 2024pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • Rename indexScripts to orchestratorScripts  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5842 <samp>(49f34)</samp>

       ๐Ÿž Bug Fixes

    • browser:
      • Print correct transformed module graph  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5833 <samp>(a7581)</samp>
      • Use preview provider when running in StackBlitz  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5836 <samp>(76e13)</samp>
      • Specify entries for correct deps optimization  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5839 <samp>(c79b3)</samp>
      • Allow iframe to load even if there is a custom CSP header  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5841 <samp>(caaaf)</samp>
        View changes on GitHub
    Open source โ†’
  9. 2.0.0-beta.73 Jun 2024pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • Add meta to json output  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5802 <samp>(dd754)</samp>

       ๐Ÿš€ Features

    • browser:
      • Support click event  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5777 <samp>(839c3)</samp>
      • Rename none provider to preview, make it default  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5826 <samp>(18310)</samp>

       ๐Ÿž Bug Fixes

    • browser:
      • Use iframe id instead of calculating it from filenames  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5823 <samp>(34a31)</samp>
      • Always clean up iframes on rerun  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5827 <samp>(087fa)</samp>
      • Support @testing-library/vue in browser mode out of the box  -  by @sheremet-va <samp>(76b82)</samp>
    • coverage:
      • thresholds.autoUpdate to support mergeConfig  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5818 <samp>(7afb3)</samp>
    • runner:
      • Ensure test.each print -0 and -NaN properly  -  by @pengooseDev in https://github.com/vitest-dev/vitest/issues/5806 <samp>(9ac8f)</samp>
        View changes on GitHub
    Open source โ†’
  10. 2.0.0-beta.62 Jun 2024pre-release
    Release notes

       ๐Ÿž Bug Fixes

    • browser:
      • Restore the original viewport when unselecting the preset viewport  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5821 <samp>(5ebb3)</samp>
      • Don't get stuck after the manual page refresh  -  by @sheremet-va <samp>(2220b)</samp>
        View changes on GitHub
    Open source โ†’
  11. 2.0.0-beta.52 Jun 2024pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • --merge-reports to support coverage  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5736 <samp>(b7438)</samp>
    • Add promise-based return assertions, do not auto-resolve returned promises  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5749 <samp>(5f710)</samp>
    • Do not exit process if global setup has failed  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5726 <samp>(ddb09)</samp>

       ๐Ÿš€ Features

    • Add browser.ui option  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5771 <samp>(a5033)</samp>
    • Add median to --output-json  -  by @Joristdh in https://github.com/vitest-dev/vitest/issues/5745 <samp>(0766b)</samp>
    • Allow augmenting config.test.env  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5784 <samp>(b2469)</samp>
    • Implement module mocking in browser mode  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5765 <samp>(7b2f6)</samp>
    • Allow configuring expect options in the config  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5729 <samp>(fc53f)</samp>
    • Add an option to print console stack trace  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5720 <samp>(e4fe6)</samp>
    • Add browser frame to UI  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5808 <samp>(3796d)</samp>
    • browser:
      • Do not reload the page during watch mode  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5810 <samp>(e5b9a)</samp>
      • Support changing the viewport  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5811 <samp>(71851)</samp>
      • Add browser iframe mouse interaction  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5815 <samp>(f29b9)</samp>
    • ui:
      • Render tests in a tree  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5807 <samp>(7900f)</samp>

       ๐Ÿž Bug Fixes

    • Repeatable --exclude option  -  by @fregante in https://github.com/vitest-dev/vitest/issues/5782 <samp>(d6700)</samp>
    • Remove browser.fileParallelism  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5790 <samp>(b881e)</samp>
    • Install UI icons  -  by @sheremet-va <samp>(b84f1)</samp>
    • Remove process.exit if workspace project failed to be created  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5804 <samp>(a820e)</samp>
    • browser:
      • Browser actions icons colors  -  by @userquin in https://github.com/vitest-dev/vitest/issues/5816 <samp>(f9d9b)</samp>
    • coverage:
      • Clean up empty coverage reports directory  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5731 <samp>(c469c)</samp>
    • runner:
      • Ensure inner suite { sequential: true } correctly overrides outer suite { concurrent: true }  -  by @pengooseDev in https://github.com/vitest-dev/vitest/issues/5737 <samp>(a20e7)</samp>
    • ui:
      • Show correct module graph and project name in a Vitest workspace  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5792 <samp>(48c50)</samp>
    • utils:
      • Produce valid snapshot names  -  by @dubzzz in https://github.com/vitest-dev/vitest/issues/5724 <samp>(1ec61)</samp>
      • Fix color util maximum call stack error  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5733 <samp>(a4ec5)</samp>
        View changes on GitHub
    Open source โ†’
  12. 2.0.0-beta.314 May 2024pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • Don't exit process if config failed  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5715 <samp>(f232f)</samp>

       ๐Ÿš€ Features

    • Remove deprecated options  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5696 <samp>(5c308)</samp>
    • Add blob reporter  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5663 <samp>(e2053)</samp>
    • Add expect.poll utility  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5708 <samp>(e2e0f)</samp>
    • browser: Add commands to communicate betweens server and the browser  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5097 <samp>(aa431)</samp>

       ๐Ÿž Bug Fixes

        View changes on GitHub
    Open source โ†’
  13. 2.0.0-beta.29 May 2024pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • Change default pool to 'forks'  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5047 <samp>(7f8f9)</samp>
        View changes on GitHub
    Open source โ†’
  14. 2.0.0-beta.19 May 2024pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • Remove the empty suite from the runner  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5435 <samp>(dbbbe)</samp>
    • Remove --segfault-retry  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5514 <samp>(ed60e)</samp>
    • Run suite hooks in a stack  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5609 <samp>(1277d)</samp>
    • Enable coverage.ignoreEmptyLines by default  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5543 <samp>(31994)</samp>
    • Add correct location and snapshot fields in json reporter  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5434 <samp>(bcccc)</samp>
    • Update dependency chai to v5  -  by @renovate[bot] and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5135 <samp>(73646)</samp>
    • Remove watchExclude  -  by @patak-dev in https://github.com/vitest-dev/vitest/issues/5177 <samp>(d7371)</samp>

       ๐Ÿš€ Features

    • Pretty print diffs coming from cause  -  by @dubzzz in https://github.com/vitest-dev/vitest/issues/5660 <samp>(6faf8)</samp>
    • Allow import statement as vi.mock path for better IDE support  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5690 <samp>(a99a1)</samp>

       ๐Ÿž Bug Fixes

    • Print console statements in vmThreads  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5678 <samp>(34a80)</samp>
    • expect: Fix immutable.js iterable equality  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5692 <samp>(1532c)</samp>
        View changes on GitHub
    Open source โ†’
  15. 1.6.13 Feb 2025
    Release notes

    This release includes security patches for:

       ๐Ÿž Bug Fixes

    • backport https://github.com/vitest-dev/vitest/issues/7317 to v1 - by @hi-ogawa in https://github.com/vitest-dev/vitest/pull/7319
        View changes on GitHub
    Open source โ†’
  16. 1.6.03 May 2024
    Release notes

       ๐Ÿš€ Features

    • Support standalone mode  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5565 <samp>(bdce0)</samp>
    • Custom "snapshotEnvironment" option  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5449 <samp>(30f72)</samp>
    • benchmark: Support comparing benchmark result  -  by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5398 <samp>(f8d3d)</samp>
    • browser: Allow injecting scripts  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5656 <samp>(21e58)</samp>
    • reporter: Support includeConsoleOutput and addFileAttribute in junit  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5659 <samp>(2f913)</samp>
    • ui: Sort items by file name  -  by @btea in https://github.com/vitest-dev/vitest/issues/5652 <samp>(1f726)</samp>

       ๐Ÿž Bug Fixes

    • Keep order of arguments for .each in custom task collectors  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5640 <samp>(7d57c)</samp>
    • Call resolveId('vitest') after buildStart  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5646 <samp>(f5faf)</samp>
    • Hash the name of the file when caching  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5654 <samp>(c9e68)</samp>
    • Don't panic on empty files in node_modules  -  by @sheremet-va <samp>(40c29)</samp>
    • Use toJSON for error serialization  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5526 <samp>(19a21)</samp>
    • coverage:
      • Exclude *.test-d.* by default  -  by @MindfulPol in https://github.com/vitest-dev/vitest/issues/5634 <samp>(bfe8a)</samp>
      • Apply vite-node's wrapper only to executed files  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5642 <samp>(c9883)</samp>
    • vm:
      • Support network imports  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5610 <samp>(103a6)</samp>

       ๐ŸŽ Performance

    • Improve performance of forks pool  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5592 <samp>(d8304)</samp>
    • Unnecessary rpc call when coverage is disabled  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5658 <samp>(c5712)</samp>
        View changes on GitHub
    Open source โ†’
  17. 1.5.330 Apr 2024
    Release notes

       ๐Ÿž Bug Fixes

    • Use package.json name for a workspace project if not provided  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5608 <samp>(48fba)</samp>
    • Backport jest iterable equality within object  -  by @sukovanej in https://github.com/vitest-dev/vitest/issues/5621 <samp>(30e5d)</samp>
    • browser: Support benchmark  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5622 <samp>(becab)</samp>
    • reporter: Use default error formatter for JUnit  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5629 <samp>(20060)</samp>
        View changes on GitHub
    Open source โ†’
  18. 1.5.225 Apr 2024
    Release notes

       ๐Ÿž Bug Fixes

        View changes on GitHub
    Open source โ†’
  19. 1.5.124 Apr 2024
    Release notes

       ๐Ÿš€ Features

    • api: startVitest() to accept stdout and stdin  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5493 <samp>(780b1)</samp>
      • This is listed as a feature, but it doesn't increase the minor version because startVitest API is experimental and doesn't follow semver.

       ๐Ÿž Bug Fixes

    • Close vite servers on all resolved projects  -  by @surc54 in https://github.com/vitest-dev/vitest/issues/5544 <samp>(413ec)</samp>
    • Fix default import.meta.env.PROD: false  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5561 <samp>(9c649)</samp>
    • Resolve cwd correctly when initiating projects  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5582 <samp>(ec9d7)</samp>
    • Always run onTestFinished in reverse order  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5598 <samp>(23f29)</samp>
    • browser:
      • Disable fileParallelism by default on browser pool  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5528 <samp>(5c69f)</samp>
      • Dispose tester iframe on done  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5595 <samp>(b2135)</samp>
    • coverage:
      • Fix bundling of v8-to-istanbul  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5549 <samp>(df6a4)</samp>
      • Prevent crash when cleanOnRerun is disabled  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5540 <samp>(ea3c1)</samp>
      • thresholds to compare files relative to root  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5574 <samp>(80265)</samp>
    • expect:
      • Fix toEqual and toMatchObject with circular references  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5535 <samp>(9e641)</samp>
    • vitest:
      • Fix false positive file filter match with leading slash  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5578 <samp>(316eb)</samp>
      • Watch the output directory correctly  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5584 <samp>(e40f9)</samp>
      • StubEnv casts boolean on PROD/SSR/DEV  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5590 <samp>(4da88)</samp>
        View changes on GitHub
    Open source โ†’
  20. 1.5.011 Apr 2024
    Release notes

       ๐Ÿš€ Features

    • Add configuration for diff truncation  -  by @willieho in https://github.com/vitest-dev/vitest/issues/5073 and https://github.com/vitest-dev/vitest/issues/5333 <samp>(6797b)</samp>
    • Remove unrelated noise from diff for toMatchObject()  -  by @geersch in https://github.com/vitest-dev/vitest/issues/5364 <samp>(99276)</samp>
    • Allow custom host for --inspect and --inspect-brk  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5509 <samp>(61572)</samp>
    • coverage: V8 to ignore empty lines, comments, types  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5457 <samp>(10b89)</samp>

       ๐Ÿž Bug Fixes

    • describe calls not taking generic type parameters  -  by @aryaemami59 in https://github.com/vitest-dev/vitest/issues/5415 <samp>(16bac)</samp>
    • Prevent hang when process is mocked  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5430 <samp>(0ec4d)</samp>
    • Don't check for "node:internal/console/" in console interceptor in case the environment is not Node.js  -  by @sheremet-va <samp>(87d36)</samp>
    • The value received by toMatch should be a string  -  by @btea in https://github.com/vitest-dev/vitest/issues/5428 <samp>(67485)</samp>
    • Increase stack trace limit for location, don't hardcode suite position  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5518 <samp>(04b23)</samp>
    • benchmark:
      • Run benchmark suites sequentially  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5444 <samp>(1f548)</samp>
      • Fix benchmark summary of single bench suite  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5489 <samp>(db981)</samp>
      • Table reporter for non TTY output  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5484 <samp>(bea23)</samp>
    • expect:
      • Fix toHaveBeenNthCalledWith error message when not called  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5420 <samp>(e5253)</samp>
    • types:
      • Pass correct type for suite factory  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5437 <samp>(26718)</samp>
    • utils:
      • Fix object diff with getter only property  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5466 <samp>(366d9)</samp>
    • vite-node:
      • Fix isValidNodeImport to check "type": "module" first  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5416 <samp>(6fb15)</samp>
    • vitest:
      • Correctly send console events when state changes  -  by @sheremet-va <samp>(3463f)</samp>
      • Initiate FakeTimers on demand  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5450 <samp>(e4e93)</samp>
      • Check unhighlighted code for code frame line limit  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5465 <samp>(6ae7e)</samp>
      • Correctly filter by parent folder  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5408 <samp>(91b06)</samp>
      • Close inspector immediately if run is canceled  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5519 <samp>(b8006)</samp>
    • workspace:
      • Set CWD to config directory, allow overriding local .env  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5476 <samp>(d4003)</samp>
        View changes on GitHub
    Open source โ†’
  21. 1.4.015 Mar 2024
    Release notes

       ๐Ÿš€ Features

    • Throw error when using snapshot assertion with not  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5294 <samp>(b9d37)</samp>
    • Add a flag to include test location in tasks  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5342 <samp>(d627e)</samp>
    • cli:
      • Support wildcards in --project option  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5295 <samp>(201bd)</samp>
    • config:
      • Add shuffle.files and shuffle.tests options  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5281 <samp>(356db)</samp>
      • Deprecate cache.dir option  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5229 <samp>(d7e8b)</samp>
    • coverage:
      • Support --changed option  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5314 <samp>(600b4)</samp>
    • vitest:
      • Support clearScreen cli flag  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5241 <samp>(e1735)</samp>

       ๐Ÿž Bug Fixes

    • Repeatable --project option  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5265 <samp>(d1a06)</samp>
    • --inspect-brk to pause before execution  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5355 <samp>(e77c5)</samp>
    • Correct locations in test.each tasks  -  by @sheremet-va <samp>(4f6e3)</samp>
    • api:
      • Use resolvedUrls from devserver  -  by @saitonakamura and @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5289 <samp>(2fef5)</samp>
    • browser:
      • Add magic-string to optimizeDeps.include  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5278 <samp>(8f04e)</samp>
    • coverage:
      • Expensive regexp hangs v8 report generation  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5259 <samp>(d68a7)</samp>
      • V8 to ignore type-only files  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5328 <samp>(c3eb8)</samp>
      • Respect source maps of pre-transpiled sources  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5367 <samp>(6eda4)</samp>
      • Prevent reportsDirectory from removing user's project  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5376 <samp>(07ec3)</samp>
    • expect:
      • Show diff on toContain/toMatch assertion error  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5267 <samp>(8ee59)</samp>
    • forks:
      • Wrap defines to support undefined values  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5284 <samp>(5b58b)</samp>
    • typecheck:
      • Update get-tsconfig 4.7.3 to fix false circularity error  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5384 <samp>(bdc37)</samp>
    • ui:
      • Escape html in error diff  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5325 <samp>(ab60b)</samp>
    • vitest:
      • Loosen onConsoleLog return type  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5337 <samp>(6d1b1)</samp>
      • Ensure restoring terminal cursor on close  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5292 <samp>(0bea2)</samp>
      • Ignore timeout on websocket reporter rpc  -  by @sheremet-va <samp>(38119)</samp>
      • Correctly override api with --no-api flag  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5386 <samp>(51d1d)</samp>
      • Logs in beforeAll and afterAll  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5288 <samp>(ce5ca)</samp>
    • workspace:
      • Throw error when browser mode and @vitest/coverage-v8 are used  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5250 <samp>(29f98)</samp>
        View changes on GitHub
    Open source โ†’
  22. 1.3.120 Feb 2024
    Release notes

       ๐Ÿš€ Features

    • vitest: Expose parseCLI method  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5248 <samp>(c793a)</samp>
      • This feature is not affected by SemVer because it is part of an experimental API.

       ๐Ÿž Bug Fixes

    • Add task tests iteratively  -  by @DerYeger in https://github.com/vitest-dev/vitest/issues/5235 <samp>(38155)</samp>
    • coverage: Ignore generated TS decorators  -  by @AriPerkkio and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5206 <samp>(a2804)</samp>
    • ui: Auto reload coverage iframe after test run  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5242 <samp>(5376d)</samp>
        View changes on GitHub
    Open source โ†’
  23. 1.3.016 Feb 2024
    Release notes

    ๐Ÿš€ Features

    • Deprecate watchExclude - by @patak-dev in https://github.com/vitest-dev/vitest/issues/5171 <samp>(82885)</samp>
    • browser:
      • Run test files in isolated iframes - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5036 <samp>(4f401)</samp>
    • config:
      • Add snapshotSerializers option - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5092 <samp>(5b102)</samp>
    • reporters:
      • Support custom options - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5111 <samp>(fec9c)</samp>
    • runner:
      • Support automatic fixtures - by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/5102 <samp>(0441f)</samp>
    • ui:
      • Save splitpanes size to local storage - by @posva in https://github.com/vitest-dev/vitest/issues/5166 <samp>(c28b4)</samp>
    • vitest:
      • Add onTestFinished hook - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5128 <samp>(6f5b4)</samp>
      • Add github actions reporter - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5093 <samp>(40afb)</samp>
      • Expose jsdom global if jsdom environment is enabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5155 <samp>(567d2)</samp>
      • Add new CLI options - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5163 <samp>(4e179)</samp>
      • "test" accepts options object as the second parameter - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5142 <samp>(7d9b1)</samp>
    • vm:
      • Support wasm module - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5131 <samp>(5ed53)</samp>

    ๐Ÿž Bug Fixes

    • Fix sourcemap in vm pools - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5063 <samp>(81105)</samp>
    • Don't optimize react/jsx-runtime by default when running in Node - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5079 <samp>(0d2bf)</samp>
    • Rpc timeout error messages to include caller - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5103 <samp>(a6e04)</samp>
    • Requires fixed version across the monorepo - by @antfu in https://github.com/vitest-dev/vitest/issues/5208 <samp>(68f51)</samp>
    • Prevent merging of poolOptions - by @penalosa in https://github.com/vitest-dev/vitest/issues/5221 <samp>(bc5b2)</samp>
    • browser:
      • Don't exclude node builtins from optimization - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5082 <samp>(714c9)</samp>
      • Support coverage.reportsDirectory with multiple directories - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5056 <samp>(ae73f)</samp>
    • cli:
      • Parse --browser=<name> correctly - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5179 <samp>(656e2)</samp>
    • coverage:
      • .tmp directory conflicts with --shard option - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5184 <samp>(5749d)</samp>
    • deps:
      • Update dependency strip-literal to v2 - by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/5136 <samp>(ef557)</samp>
    • reporters:
      • Testsuite name should include project root in Junit output - by @fenghan34 in https://github.com/vitest-dev/vitest/issues/5116 <samp>(2494f)</samp>
    • typecheck:
      • Fix suite collection while-loop - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5065 <samp>(35675)</samp>
    • ui:
      • Fix tests duration time - by @vovsemenv in https://github.com/vitest-dev/vitest/issues/5219 <samp>(58103)</samp>
    • utils:
      • Fix asymmetric matcher diff inside array - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5189 <samp>(3ffcd)</samp>
    • vitest:
      • Correctly report failed test files as failures in json reporter, export json reporter types - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5081 <samp>(0417b)</samp>
      • Don't run typecheck tests in browser if both are enabled - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5080 <samp>(1045b)</samp>
      • Handle function config inside defineWorkspace - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5089 <samp>(0bf52)</samp>
      • Remove excessive listeners when running without isolation, don't reset the state - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5132 <samp>(b607f)</samp>
      • Auto-enable "github-actions" only where users didn't configure reporters - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5158 <samp>(ef044)</samp>
      • Support more array cli options - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5162 <samp>(3afe6)</samp>
      • Add types for the new global jsdom variable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5164 <samp>(0f898)</samp>
      • Expose onTestFinished globally - by @sheremet-va <samp>(1304f)</samp>
      • Disable optimizer by default until it's stable - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5156 <samp>(e1bd8)</samp>
      • Delegate snapshot options to workspace from root config - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5199 <samp>(86297)</samp>
      • Fix optimizeDeps.disabled warnings on Vite 5.1 - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5215 <samp>(1aecd)</samp>
    • vm:
      • Handle disableConsoleIntercept config - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5074 <samp>(a55ad)</samp>
      • Improve error when module is not found - by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5053 <samp>(79a50)</samp>
    View changes on GitHub
    Open source โ†’
  24. 1.2.226 Jan 2024
    Release notes

       ๐Ÿž Bug Fixes

    • coverage:
      • Remove coverage/.tmp files after run  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5008 <samp>(d53b8)</samp>
      • Don't crash when re-run removes earlier run's reports  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5022 <samp>(66898)</samp>
    • expect:
      • Improve toThrow(asymmetricMatcher) failure message  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5000 <samp>(a199a)</samp>
    • forks:
      • Set correct VITEST_POOL_ID  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5002 <samp>(7d0a4)</samp>
    • threads:
      • Mention common work-around for the logged error  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5024 <samp>(915d6)</samp>
    • typecheck:
      • Fix ignoreSourceErrors in run mode  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5044 <samp>(6dae3)</samp>
    • vite-node:
      • Provide import.meta.filename and dirname  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5011 <samp>(73148)</samp>
    • vitest:
      • Expose getHooks & setHooks  -  by @adriencaccia in https://github.com/vitest-dev/vitest/issues/5032 <samp>(73448)</samp>
      • Test deep dependencies change detection  -  by @blake-newman in https://github.com/vitest-dev/vitest/issues/4934 <samp>(9c7c0)</samp>
      • Throw an error if vi.mock is exported  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5034 <samp>(253df)</samp>
      • Allow useFakeTimers to fake requestIdleCallback on non browser  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/5028 <samp>(a9a48)</samp>
      • Support older NodeJS with async import.meta.resolve  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/5045 <samp>(cf564)</samp>
      • Don't throw an error if mocked file was already imported  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/5050 <samp>(fff1a)</samp>
        View changes on GitHub
    Open source โ†’
  25. 1.2.117 Jan 2024
    Release notes

       ๐Ÿž Bug Fixes

    • browser:
      • Apply inlined workspace config to browser mode vite server  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4947 <samp>(db01f)</samp>
      • Fix browser testing url for https  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4855 <samp>(6c1cc)</samp>
      • Don't fail when calling vi.useFakeTimers  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4992 <samp>(6c5fe)</samp>
    • coverage:
      • thresholds.autoUpdate to work with arrow function configuration files  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4959 <samp>(4b411)</samp>
    • expect:
      • Implement chai inspect for AsymmetricMatcher  -  by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4942 <samp>(06bae)</samp>
    • vite-node:
      • Externalize network imports  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4987 <samp>(21f57)</samp>
    • vitest:
      • Handle single await vi.hoisted  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4962 <samp>(dcf2e)</samp>
      • Simplify hoist transform check regex to avoid expensive regex match  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4974 <samp>(df0db)</samp>
      • Correctly find module if it has a version query  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4976 <samp>(952c3)</samp>
      • Check color support for intercepted console logging  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4966 <samp>(39a71)</samp>
      • Use development/production conditions when resolving external modules  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4980 <samp>(8877e)</samp>
      • Throw a syntax error if vi.hoisted is directly exported  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4969 <samp>(f8bff)</samp>
        View changes on GitHub
    Open source โ†’
  26. 1.2.012 Jan 2024
    Release notes

       ๐Ÿš€ Features

    • Support case-insensitive path matching in cli  -  by @tigranmk in https://github.com/vitest-dev/vitest/issues/3567 and https://github.com/vitest-dev/vitest/issues/4911 <samp>(1326c)</samp>
    • Add typeahead search  -  by @bonyuta0204 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4275 and https://github.com/vitest-dev/vitest/issues/4733 <samp>(480d8)</samp>
    • Add syntax highlighting to error messages  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4813 <samp>(8c969)</samp>
    • Allow extending toEqual  -  by @tigranmk and @sheremet-va in https://github.com/vitest-dev/vitest/issues/2875 and https://github.com/vitest-dev/vitest/issues/4880 <samp>(463be)</samp>
    • coverage:
      • Custom reporter support  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4828 <samp>(96dc6)</samp>
    • ui:
      • Show unhandled errors on the ui  -  by @spiroka and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4380 <samp>(7f59a)</samp>
    • vitest:
      • Add --disable-console-intercept option to allow opting-out from automatic console log interception  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4786 <samp>(43fa6)</samp>
      • Show slow test duration in verbose reporter on CI  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4929 <samp>(ccb25)</samp>
      • Allow overiding package installer with public API  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4936 <samp>(c2cce)</samp>

       ๐Ÿž Bug Fixes

    • browser:
      • Support vite config server.headers  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4890 <samp>(55f53)</samp>
      • Fix testNamePattern config  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4909 <samp>(4add9)</samp>
      • Fix updating snapshot during watch mode  -  by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4867 <samp>(508fc)</samp>
      • Remove redundant test failure logging  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4891 <samp>(7fd44)</samp>
    • happy-dom:
      • Window.close() for environment teardown  -  by @capricorn86 in https://github.com/vitest-dev/vitest/issues/4931 <samp>(91719)</samp>
    • utils:
      • Fix objDisplay default truncate option for test.each title  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4917 <samp>(9ae9d)</samp>
    • vitest:
      • Fix tap reporter to handle custom error  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4897 <samp>(f8ba8)</samp>
      • Gracefully exit Vitest if process.exit is called inside the test  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4903 <samp>(8e6c1)</samp>
      • Throw "cannot mock" error only in isolated pools  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4905 <samp>(f99cc)</samp>
      • Don't throw SyntaxError when "await vi.hoisted" is used  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4915 <samp>(ca62f)</samp>
      • Correctly parse --maxWorkers/--minWorkers  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4924 <samp>(0e77e)</samp>
      • Show correct error when vi.hoisted is used inside vi.mock and the other way around  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4916 <samp>(c4eac)</samp>
      • Call global teardown when using workspaces  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4935 <samp>(528bd)</samp>
      • Use file instead of id for HMR  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4938 <samp>(ca76f)</samp>
      • Add inlined deps to ssr.noExternal so they are added to the module graph  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4945 <samp>(1663f)</samp>
    • workspace:
      • Support overring pool and poolOptions on project level  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4765 <samp>(e9fe4)</samp>
        View changes on GitHub
    Open source โ†’
  27. 1.1.35 Jan 2024
    Release notes

       ๐Ÿž Bug Fixes

    • vitest:
      • Vi.mock breaks tests when using imported variables inside the factory  -  by @sheremet-va and Dunqing in https://github.com/vitest-dev/vitest/issues/4873 <samp>(7719e)</samp>
      • Apply slowTestThreshold to all reporters  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4876 <samp>(1769c)</samp>
        View changes on GitHub
    Open source โ†’
  28. 1.1.24 Jan 2024
    Release notes

       ๐Ÿž Bug Fixes

    • Remove internal flag from UI option in the config  -  by @sheremet-va <samp>(7b4a2)</samp>
    • browser:
      • Avoid safaridriver collision  -  by @mbland in https://github.com/vitest-dev/vitest/issues/4863 <samp>(345a2)</samp>
      • Resolved failure to find arbitrarily-named snapshot files when using expect(...).toMatchFileSnapshot() matcher.  -  by @zmullett, Zac Mullett and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4839 <samp>(b8140)</samp>
      • Handle config.base  -  by @mbland and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4686 and https://github.com/vitest-dev/vitest/issues/4692 <samp>(9e345)</samp>
    • deps:
      • Update dependency acorn-walk to ^8.3.1  -  by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4837 <samp>(47bc2)</samp>
      • Update dependency sirv to ^2.0.4  -  by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4838 <samp>(df261)</samp>
    • runner:
      • Fix fixture cleanup for concurrent tests  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4827 <samp>(1fee6)</samp>
    • spy:
      • Don't allow Promise in mockImplementation if it's not in the function signature  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4859 <samp>(072e0)</samp>
    • vite-node:
      • Correctly return cached result  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4870 <samp>(15bbb)</samp>
    • vitest:
      • Throw an error if mock was already loaded when vi.mock is called  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4862 <samp>(e12a5)</samp>
      • Correctly rerun test files on change if server was restarted  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4871 <samp>(6088b)</samp>
    • vm-threads:
      • Don't crash on percentage based memoryLimit  -  by @inottn and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4802 <samp>(70e8a)</samp>
        View changes on GitHub
    Open source โ†’
  29. 1.1.131 Dec 2023
    Release notes

       ๐Ÿž Bug Fixes

    • Don't crash when using happy-dom or jsdom environment on Yarn PnP workspaces  -  by @wojtekmaj and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4698 <samp>(ee8b4)</samp>
    • Don't fail if inline: true is set  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4815 <samp>(8f622)</samp>
    • Correct option name --no-parallelism  -  by @bonyuta0204 in https://github.com/vitest-dev/vitest/issues/4831 <samp>(5053a)</samp>
    • Match jest json output by making json reporter output ndjson-compatible  -  by @bard in https://github.com/vitest-dev/vitest/issues/4824 <samp>(7e6a6)</samp>
    • runner:
      • Reset "current test" state on dynamic skip  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4814 <samp>(19faf)</samp>
    • vitest:
      • Don't hang when mocking files with cyclic dependencies  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4811 <samp>(e8ca6)</samp>
      • Initialize snapshot state only once for each file suite  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4796 <samp>(957da)</samp>
      • Fix file snapshots in skipped suites considered obsolete  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4795 <samp>(06c14)</samp>
      • Show beforeAll/afterAll errors in junit reporter  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4819 <samp>(2baea)</samp>
    • vm-threads:
      • Tests not cancelled on key press, cancelled tests shown twice  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4781 <samp>(cf53d)</samp>
        View changes on GitHub
    Open source โ†’
  30. 1.1.019 Dec 2023
    Release notes

       ๐Ÿš€ Features

    • Add es-main compatibility to vite-node  -  by @zookatron in https://github.com/vitest-dev/vitest/issues/4751 <samp>(486a3)</samp>
    • Add --workspace option, fix root resolution in workspaces  -  by @sheremet-va and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4773 <samp>(67d93)</samp>
    • Add --no-file-parallelism, --maxWorkers, --minWorkers flags  -  by @sheremet-va and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4705 <samp>(fd5d7)</samp>
    • Add --no-isolate flag to improve performance, add documentation about performance  -  by @sheremet-va, @AriPerkkio and Pascal Jufer in https://github.com/vitest-dev/vitest/issues/4777 <samp>(4d55a)</samp>
    • Add --exclude CLI flag  -  by @Namchee and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4279 <samp>(f859e)</samp>

       ๐Ÿž Bug Fixes

    • Correctly reset provided values  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4775 <samp>(5a71e)</samp>
    • expect:
      • Fix toHaveProperty assertion error diff  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4734 <samp>(f8f70)</samp>
    • runner:
      • Handle fixture teardown error  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4683 <samp>(c6f5f)</samp>
    • types:
      • defineWorkspace fix intellisense and report type errors  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4743 <samp>(9cc36)</samp>
    • ui:
      • Escape html for console log view  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4724 <samp>(e0dde)</samp>
      • Fix coverage iframe url for html report preview  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4717 <samp>(71911)</samp>
      • Show file item when search filter matches only test cases  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4736 <samp>(f43fd)</samp>
    • vitest:
      • Pass down CLI options to override workspace configs  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4774 <samp>(8dabe)</samp>
        View changes on GitHub
    Open source โ†’
  31. 1.0.49 Dec 2023
    Release notes

    The previous release was built incorrectly and didn't include the performance fix. This release fixes that.

       ๐Ÿž Bug Fixes

    • cli: --coverage.all=false resolved incorrectly  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4697 <samp>(a7931)</samp>

       ๐ŸŽ Performance

    • reporters: Downgrade log-update to v5  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4711 <samp>(13ff9)</samp>
        View changes on GitHub
    Open source โ†’
  32. 1.0.39 Dec 2023
    Release notes

       ๐Ÿž Bug Fixes

    • Correct package exports  -  by @userquin in https://github.com/vitest-dev/vitest/issues/4707 <samp>(37388)</samp>
    • runner: Fix async fixture teardown  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4700 <samp>(92afd)</samp>
    • vitest: Correctly filter changed files when Vitest workspace is used  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4693 <samp>(34135)</samp>

       ๐ŸŽ Performance

    • reporters: Downgrade log-update to v5  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4711 <samp>(13ff9)</samp>
        View changes on GitHub
    Open source โ†’
  33. 1.0.27 Dec 2023
    Release notes

       ๐Ÿž Bug Fixes

    • Don't check if vite is installed  -  by @wojtekmaj in https://github.com/vitest-dev/vitest/issues/4659 <samp>(775e2)</samp>
    • Fix ensurePackageInstalled on Yarn PnP  -  by @wojtekmaj in https://github.com/vitest-dev/vitest/issues/4657 <samp>(574cc)</samp>
    • Apply stripSnapshotIndentation for thrown snapshot  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4663 <samp>(74820)</samp>
    • cli:
      • Prompted packages fail to install  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4593 <samp>(a9908)</samp>
    • expect:
      • Apply URL equality check only when URL is available  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4670 <samp>(43783)</samp>
    • runner:
      • Improve fixture error messages  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4673 <samp>(1e4aa)</samp>
      • Fix fixture cleanup when test times out  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4679 <samp>(e7c5e)</samp>
    • vitest:
      • Support new Request('/api') in happy-dom  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4671 <samp>(6e6ee)</samp>
      • Skip processing getter in auto-mocked constructor call  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4677 <samp>(cb786)</samp>
        View changes on GitHub
    Open source โ†’
  34. 1.0.14 Dec 2023
    Release notes

       ๐Ÿž Bug Fixes

    • Bump vitest packages peerDependencies versions  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4654 <samp>(42070)</samp>
        View changes on GitHub
    Open source โ†’
  35. 1.0.04 Dec 2023
    Release notes

    Vitest 1.0 is here! This release page lists all changes made to the project during the beta. For the migration guide, please refer to the documentation.

       ๐Ÿšจ Breaking Changes

    • Add support for pool and poolOptions, remove old flags  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4172 <samp>(114a9)</samp>
    • Support multiple parallel child_process  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3925 <samp>(8b4a4)</samp>
    • Make snapshots more visually pleasing by @sheremet-va in https://github.com/vitest-dev/vitest/pull/3961
    • Set vitest peer dependency range for sub packages  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4299 <samp>(cd03c)</samp>
    • Bump minimum node version to 18 and match Vite 5 requirement  -  by @ghiscoding in https://github.com/vitest-dev/vitest/issues/4296 <samp>(263b7)</samp>
    • Remove deprecated node loader  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4371 <samp>(29299)</samp>
    • Move browser providers to @vitest/browser package  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4364 <samp>(5cdeb)</samp>
    • Remove EnhancedSpy type, deprecate SpyInstance, improve mocks and vi documentation  -  by @sheremet-va and @dammy001 in https://github.com/vitest-dev/vitest/issues/4400 <samp>(d40b3)</samp>
    • expect().toContain() can handle classList, Node.contains, and any array-like structure. This means you cannot use it to check if one object is a subset of another - use expect().toMatchObject() in that case  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4239 <samp>(ce84f)</samp>
    • runner: Correctly process custom tasks, update runner hooks naming by @sheremet-va in https://github.com/vitest-dev/vitest/pull/4076
    • coverage:
      • glob based coverage thresholds by @AriPerkkio in https://github.com/vitest-dev/vitest/pull/4442 <samp>(18300)</samp>
      • Use transformMode and workspace project based source maps  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4309 <samp>(28109cc)</samp>
      • Enable coverage.all by default  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4265 <samp>(5a741)</samp>

       ๐Ÿš€ Features

    • Add Marko example and include code coverage for Marko files  -  by @DylanPiercey in https://github.com/vitest-dev/vitest/issues/4263 <samp>(eac77)</samp>
    • Update magic-string  -  by @bluwy in https://github.com/vitest-dev/vitest/issues/4345 <samp>(fde18)</samp>
    • Implement provide/inject API to transfer data from the main thread  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4422 <samp>(a7522)</samp>
    • Improve expectTypeOf error messages  -  by @mmkal, Misha Kaletsky and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4206 <samp>(18300)</samp>
    • Add test.sequential() api  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4512 <samp>(c3619)</samp>
    • Allow custom pools  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4417 <samp>(a3fd5)</samp>
    • Add --project option to limit what projects are running  -  by @sheremet-va, @dammy001 and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4561 <samp>(58ef5)</samp>
    • benchmark:
      • Move importTinybench to runner  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4376 <samp>(c36d2)</samp>
    • browser:
      • Support "none" provider and update lit example to use it  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4427 <samp>(d03a2)</samp>
    • coverage:
      • Support /* v8 ignore... ignore hints  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4573 <samp>(f9e4a)</samp>
    • expect:
      • Support expect.closeTo api  -  by @Dunqing and golebiowskib in https://github.com/vitest-dev/vitest/issues/4260 <samp>(7f91c)</samp>
      • Compare URL objects by href  -  by @kleinfreund and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4615 <samp>(f7a73)</samp>
    • snapshot:
      • Add option to configure snapshot directory  -  by @d3lm in https://github.com/vitest-dev/vitest/issues/4651 <samp>(20b2a)</samp>
    • vite-node:
      • Support import.meta.hot.off for vite 5  -  by @bluwy in https://github.com/vitest-dev/vitest/issues/4315 <samp>(01b1c)</samp>
    • vitest:
      • Expose getBenchFn, getBenchOptions  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4208 <samp>(8e5e4)</samp>
      • Run typecheck during tests  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4324 <samp>(a1aad)</samp>
      • Filter stacktraces  -  by @clarkf in https://github.com/vitest-dev/vitest/issues/1999 and https://github.com/vitest-dev/vitest/issues/4338 <samp>(6b734)</samp>
      • Expose execArgv to the different pools  -  by @adriencaccia in https://github.com/vitest-dev/vitest/issues/4383 <samp>(9021e)</samp>

       ๐Ÿž Bug Fixes

    • Add multiple globals in VM+JSDOM  -  by @nstepien in https://github.com/vitest-dev/vitest/issues/4199 and https://github.com/vitest-dev/vitest/issues/4202 <samp>(fc947)</samp>
    • Ignore "plugins" field in snapshotFormat option  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4204 <samp>(db1ff)</samp>
    • nextTick mocking error message to mention correct config option  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4215 <samp>(98fe3)</samp>
    • Export VitestUtils interface  -  by @fbritoferreira in https://github.com/vitest-dev/vitest/issues/4301 <samp>(b1439)</samp>
    • Assertion diff message handle non-writable sub-properties  -  by @bfamchon in https://github.com/vitest-dev/vitest/issues/4278 <samp>(7e1a0)</samp>
    • Don't bundle import from rollup  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4392 <samp>(3b584)</samp>
    • Support accessing fixture at same index of dependency fixture  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4387 <samp>(4cd1d)</samp>
    • Make asynchronous fixtures work concurrently  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4403 <samp>(3c9f9)</samp>
    • Coverage.100 crash when using as an cli argument  -  by @marcelobotega in https://github.com/vitest-dev/vitest/issues/4346 <samp>(0db38)</samp>
    • Support typechecking with Yarn PnP  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4412 <samp>(1ecbe)</samp>
    • Support accessing task from test context without accessing fixtures  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4419 <samp>(3397f)</samp>
    • Copy custom asymmetric matchers to local expect  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4405 <samp>(9fe38)</samp>
    • Apply serializer to Error instance for thrown snapshot  -  by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4396 <samp>(ac309)</samp>
    • Throw an error when running "vitest typecheck"  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4439 <samp>(7f502)</samp>
    • Don't expand snapshot diff by default  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4430 <samp>(8983c)</samp>
    • Handle errors thrown in fixtures  -  by @dsyddall <samp>(f6844)</samp>
    • Default --open to !process.env.CI  -  by @collinstevens in https://github.com/vitest-dev/vitest/issues/4477 <samp>(088a0)</samp>
    • Disable ESBuild when user config disables it  -  by @Namchee in https://github.com/vitest-dev/vitest/issues/4492 <samp>(9abde)</samp>
    • Inherit concurrent/sequential in nested suites  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4482 <samp>(ca168)</samp>
    • Provide customTesters to asymmetric matchers  -  by @sheremet-va <samp>(ac665)</samp>
    • Apply retry and bail from test config file  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4530 <samp>(94f9a)</samp>
    • Respect trailing slash when filtering by file path  -  by @ibuibu in https://github.com/vitest-dev/vitest/issues/4538 <samp>(f377a)</samp>
    • Date prototype when using setSystemTime  -  by @spiroka in https://github.com/vitest-dev/vitest/issues/4584 <samp>(3f8c3)</samp>
    • BrowserTestRunner called incorrect super methods  -  by @samthor in https://github.com/vitest-dev/vitest/issues/4632 <samp>(8385c)</samp>
    • Set process name for idle workers  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4641 <samp>(eca25)</samp>
    • bench:
      • Extract ChainableBenchmarkAPI type  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4537 <samp>(79e9b)</samp>
    • browser:
      • Improve error handling and don't rely on Node.js builtin modules in browser mode  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4244 <samp>(e7e8c)</samp>
      • Disable hijacking ES modules until vi.mock is implemented  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4414 <samp>(ab556)</samp>
      • Add vitest/ imports to entries  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4514 <samp>(648bc)</samp>
      • Wait until vite finishes prebundling of vitest dependencies  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4518 <samp>(56ee7)</samp>
      • Allow for pretty-format as a sibling dependency  -  by @nicojs in https://github.com/vitest-dev/vitest/issues/4590 <samp>(ed50a)</samp>
      • Don't go into an infinite reload loop, don't fail if "error" event is caught  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4618 <samp>(ec3d6)</samp>
      • Respect "server" option in vite config  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4627 <samp>(723f6)</samp>
    • cli:
      • Do not capture stdin when in run mode  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4310 <samp>(fc51a)</samp>
    • config:
      • Type issue of pool and poolMatchGlobs in defineConfig  -  by @InfiniteXyy in https://github.com/vitest-dev/vitest/issues/4282 <samp>(9112c)</samp>
    • coverage:
      • thresholdAutoUpdate to detect zero limits  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4287 <samp>(a29fe)</samp>
      • Exclude files and directories starting with dot by default  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4428 <samp>(b3327)</samp>
      • Improve memory usage by writing temporary files on file system  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4603 <samp>(4166c)</samp>
    • deps:
      • Update dependency v8-to-istanbul to ^9.2.0  -  by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4583 <samp>(a70f2)</samp>
      • Update dependency std-env to ^3.5.0  -  by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4582 <samp>(1fdd6)</samp>
    • example:
      • Resolve type error  -  by @jqkk in https://github.com/vitest-dev/vitest/issues/4515 <samp>(2d1b4)</samp>
    • expect:
      • Publish types file  -  by @sheremet-va <samp>(5996c)</samp>
      • Object.freeze breaks toEqual  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4303 <samp>(a4501)</samp>
      • Publish semantically correct chai types  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4322 <samp>(80a70)</samp>
      • Print full error if promise is rejected  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4467 <samp>(cadb9)</samp>
      • Don't fail when using jest expect  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4517 <samp>(60d6d)</samp>
    • happy-dom:
      • Don't crash when calling useFakeTimers with empty config  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4214 <samp>(2e1a1)</samp>
    • jsdom:
    • runner:
      • Fixture needs to be initialized for each test  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4250 <samp>(76a93)</samp>
      • Nested tests should throw errors  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4262 <samp>(8ac9f)</samp>
      • Removes deprecated error option from TaskResult  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4313 <samp>(4cee6)</samp>
      • Preserve fixtures when calling runif and skipif  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4585 and https://github.com/vitest-dev/vitest/issues/4591 <samp>(515ea)</samp>
      • PassWithNoTests option not work  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4553 <samp>(8d183)</samp>
    • vite-node:
      • Have a separate cache for web/ssr transforms  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4221 <samp>(ca5db)</samp>
      • Mjs files watch not work  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3982 <samp>(77ea9)</samp>
    • vitest:
      • Make @types/node optional  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4210 <samp>(a5383)</samp>
      • Inline chai types instead of using @types/chai  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4209 <samp>(5f477)</samp>
      • Don't initialize globalSetup if workspace doesn't run tests  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4213 <samp>(06461)</samp>
      • Deduplicate vitest when running globally or in a workspace  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4238 <samp>(93504)</samp>
      • Print file path instead of "unknown test" when logging  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4146 <samp>(ec2e8)</samp>
      • Failed to load custom environment from js/ts file  -  by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4255 <samp>(da8d0)</samp>
      • Support assets in new URL in Vite 5  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4258 <samp>(d280f)</samp>
      • Correctly hoist vi.hoisted if assigned  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4285 <samp>(ff93a)</samp>
      • Run globalSetup from the root config even if it's not in a workspace  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4325 <samp>(4293e)</samp>
      • Pass correct mode in vitest config function  -  by @adriencaccia in https://github.com/vitest-dev/vitest/issues/4399 <samp>(b8ca3)</samp>
      • Throw an error if vitest is imported using require()  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4466 <samp>(e5cf1)</samp>
      • Use correct type for defineProject to allow usage in mergeConfig  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4498 <samp>(7dee8)</samp>
      • Throw an error if Vite wasn't able to resolve aliased path  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4503 <samp>(50333)</samp>
      • Improve vi.waitUntil type to excude falsy types  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4572 <samp>(23652)</samp>
      • Add import-meta.d.ts  -  by @macdaddyaz in https://github.com/vitest-dev/vitest/issues/4571 <samp>(dd802)</samp>
      • Correctly support CSS variable when using happy-dom  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4601 <samp>(9fbf3)</samp>
      • Pass correct server options in workspace  -  by @hironytic in https://github.com/vitest-dev/vitest/issues/4539 and https://github.com/vitest-dev/vitest/issues/4540 <samp>(241a8)</samp>
      • Independently mock each instance's methods for mocked class  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4564 <samp>(05b05)</samp>
    • vm:
      • Remove sequencer usage from createVmThreadsPool function  -  by @mhogeveen in https://github.com/vitest-dev/vitest/issues/4638 <samp>(54d52)</samp>

       ๐ŸŽ Performance

    • Update log-update v9  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4390 <samp>(ba1df)</samp>
    • Close pool early in run-mode  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4623 <samp>(e0e20)</samp>
    • coverage-istanbul: all: true instruments already instrumented files  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4552 <samp>(d1e1b)</samp>
        View changes on GitHub
    Open source โ†’
  36. 1.0.0-beta.628 Nov 2023pre-release
    Release notes

       ๐Ÿš€ Features

    • Add --project option to limit what projects are running  -  by @sheremet-va, Anjorin Damilare and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4561 <samp>(58ef5)</samp>
    • coverage: Support /* v8 ignore... ignore hints  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4573 <samp>(f9e4a)</samp>

       ๐Ÿž Bug Fixes

    • Respect trailing slash when filtering by file path  -  by @ibuibu in https://github.com/vitest-dev/vitest/issues/4538 <samp>(f377a)</samp>
    • Date prototype when using setSystemTime  -  by @spiroka in https://github.com/vitest-dev/vitest/issues/4584 <samp>(3f8c3)</samp>
    • bench:
      • Extract ChainableBenchmarkAPI type  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4537 <samp>(79e9b)</samp>
    • browser:
      • Allow for pretty-format as a sibling dependency  -  by @nicojs in https://github.com/vitest-dev/vitest/issues/4590 <samp>(ed50a)</samp>
    • deps:
      • Update dependency v8-to-istanbul to ^9.2.0  -  by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4583 <samp>(a70f2)</samp>
      • Update dependency std-env to ^3.5.0  -  by @renovate[bot] in https://github.com/vitest-dev/vitest/issues/4582 <samp>(1fdd6)</samp>
    • runner:
      • Preserve fixtures when calling runif and skipif  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4585 and https://github.com/vitest-dev/vitest/issues/4591 <samp>(515ea)</samp>
      • PassWithNoTests option not work  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4553 <samp>(8d183)</samp>
    • vitest:
      • Improve vi.waitUntil type to excude falsy types  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4572 <samp>(23652)</samp>
      • Add import-meta.d.ts  -  by @macdaddyaz in https://github.com/vitest-dev/vitest/issues/4571 <samp>(dd802)</samp>
      • Correctly support CSS variable when using happy-dom  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4601 <samp>(9fbf3)</samp>
      • Pass correct server options in workspace  -  by @hironytic in https://github.com/vitest-dev/vitest/issues/4539 and https://github.com/vitest-dev/vitest/issues/4540 <samp>(241a8)</samp>

       ๐ŸŽ Performance

    • coverage-istanbul: all: true instruments already instrumented files  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4552 <samp>(d1e1b)</samp>
        View changes on GitHub
    Open source โ†’
  37. 1.0.0-beta.518 Nov 2023pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • coverage: glob based coverage thresholds by @AriPerkkio in https://github.com/vitest-dev/vitest/pull/4442 <samp>(18300)</samp>
      • Refactors coverage thresholds API into new shape and adds support for specifying thresholds for specific files using glob patterns. Moves thresholds related coverage options to coverage.thresholds. See https://github.com/vitest-dev/vitest/pull/4442 for detailed list of breaking changes

       ๐Ÿš€ Features

    • Improve expectTypeOf error messages  -  by @mmkal, Misha Kaletsky and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4206 <samp>(18300)</samp>
    • Add test.sequential() api  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4512 <samp>(c3619)</samp>
    • Allow custom pools  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4417 <samp>(a3fd5)</samp>
    • expect: ToContain can handle classList and Node.contains  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4239 <samp>(ce84f)</samp>

       ๐Ÿž Bug Fixes

    • Handle errors thrown in fixtures  -  by @dsyddall <samp>(f6844)</samp>
    • Default --open to !process.env.CI  -  by @collinstevens in https://github.com/vitest-dev/vitest/issues/4477 <samp>(088a0)</samp>
    • Disable ESBuild when user config disables it  -  by @Namchee in https://github.com/vitest-dev/vitest/issues/4492 <samp>(9abde)</samp>
    • Inherit concurrent/sequential in nested suites  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4482 <samp>(ca168)</samp>
    • Provide customTesters to asymmetric matchers  -  by @sheremet-va <samp>(ac665)</samp>
    • Apply retry and bail from test config file  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4530 <samp>(94f9a)</samp>
    • browser:
      • Add vitest/ imports to entries  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4514 <samp>(648bc)</samp>
      • Wait until vite finishes prebundling of vitest dependencies  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4518 <samp>(56ee7)</samp>
    • example:
      • Resolve type error  -  by @jqkk in https://github.com/vitest-dev/vitest/issues/4515 <samp>(2d1b4)</samp>
    • expect:
      • Print full error if promise is rejected  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4467 <samp>(cadb9)</samp>
      • Don't fail when using jest expect  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4517 <samp>(60d6d)</samp>
    • vitest:
      • Throw an error if vitest is imported using require()  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4466 <samp>(e5cf1)</samp>
      • Use correct type for defineProject to allow usage in mergeConfig  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4498 <samp>(7dee8)</samp>
      • Throw an error if Vite wasn't able to resolve aliased path  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4503 <samp>(50333)</samp>
        View changes on GitHub
    Open source โ†’
  38. 1.0.0-beta.49 Nov 2023pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • Remove EnhancedSpy type, deprecate SpyInstance, improve mocks and vi documentation  -  by @sheremet-va and @dammy001 in https://github.com/vitest-dev/vitest/issues/4400 <samp>(d40b3)</samp>

       ๐Ÿš€ Features

    • Implement provide/inject API to transfer data from the main thread  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4422 <samp>(a7522)</samp>
    • browser: Support "none" provider and update lit example to use it  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4427 <samp>(d03a2)</samp>
    • vitest: Expose execArgv to the different pools  -  by @adriencaccia in https://github.com/vitest-dev/vitest/issues/4383 <samp>(9021e)</samp>

       ๐Ÿž Bug Fixes

    • Don't bundle import from rollup  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4392 <samp>(3b584)</samp>
    • Support accessing fixture at same index of dependency fixture  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4387 <samp>(4cd1d)</samp>
    • Make asynchronous fixtures work concurrently  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4403 <samp>(3c9f9)</samp>
    • Coverage.100 crash when using as an cli argument  -  by @marcelobotega in https://github.com/vitest-dev/vitest/issues/4346 <samp>(0db38)</samp>
    • Support typechecking with Yarn PnP  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4412 <samp>(1ecbe)</samp>
    • Support accessing task from test context without accessing fixtures  -  by @dsyddall in https://github.com/vitest-dev/vitest/issues/4419 <samp>(3397f)</samp>
    • Copy custom asymmetric matchers to local expect  -  by @hi-ogawa in https://github.com/vitest-dev/vitest/issues/4405 <samp>(9fe38)</samp>
    • Apply serializer to Error instance for thrown snapshot  -  by @hi-ogawa and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4396 <samp>(ac309)</samp>
    • Throw an error when running "vitest typecheck"  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4439 <samp>(7f502)</samp>
    • Don't expand snapshot diff by default  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4430 <samp>(8983c)</samp>
    • browser: Disable hijacking ES modules until vi.mock is implemented  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4414 <samp>(ab556)</samp>
    • coverage: Exclude files and directories starting with dot by default  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4428 <samp>(b3327)</samp>
    • vitest: Pass correct mode in vitest config function  -  by @adriencaccia in https://github.com/vitest-dev/vitest/issues/4399 <samp>(b8ca3)</samp>

       ๐ŸŽ Performance

    • Update log-update v9  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4390 <samp>(ba1df)</samp>
        View changes on GitHub
    Open source โ†’
  39. 1.0.0-beta.327 Oct 2023pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • Set vitest peer dependency range for sub packages  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4299 <samp>(cd03c)</samp>
    • Bump minimum node version to 18 and match Vite 5 requirement  -  by @ghiscoding in https://github.com/vitest-dev/vitest/issues/4296 <samp>(263b7)</samp>
    • Remove deprecated node loader  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4371 <samp>(29299)</samp>
    • Move browser providers to @vitest/browser package  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4364 <samp>(5cdeb)</samp>
    • coverage:
      • Use transformMode and workspace project based source maps  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4309 <samp>(28109cc)</samp>

       ๐Ÿš€ Features

    • Update magic-string  -  by @bluwy in https://github.com/vitest-dev/vitest/issues/4345 <samp>(fde18)</samp>
    • benchmark:
      • Move importTinybench to runner  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4376 <samp>(c36d2)</samp>
    • vite-node:
      • Support import.meta.hot.off for vite 5  -  by @bluwy in https://github.com/vitest-dev/vitest/issues/4315 <samp>(01b1c)</samp>
    • vitest:
      • Run typecheck during tests (vitest typecheck is removed, use --typecheck)  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4324 <samp>(a1aad)</samp>
      • Filter stacktraces  -  by @clarkf in https://github.com/vitest-dev/vitest/issues/1999 and https://github.com/vitest-dev/vitest/issues/4338 <samp>(6b734)</samp>

       ๐Ÿž Bug Fixes

    • Export VitestUtils interface  -  by @fbritoferreira in https://github.com/vitest-dev/vitest/issues/4301 <samp>(b1439)</samp>
    • Assertion diff message handle non-writable sub-properties  -  by @bfamchon in https://github.com/vitest-dev/vitest/issues/4278 <samp>(7e1a0)</samp>
    • cli:
      • Do not capture stdin when in run mode  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4310 <samp>(fc51a)</samp>
    • config:
      • Type issue of pool and poolMatchGlobs in defineConfig  -  by @InfiniteXyy in https://github.com/vitest-dev/vitest/issues/4282 <samp>(9112c)</samp>
    • coverage:
      • thresholdAutoUpdate to detect zero limits  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4287 <samp>(a29fe)</samp>
    • expect:
      • Object.freeze breaks toEqual  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4303 <samp>(a4501)</samp>
      • Publish semantically correct chai types  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4322 <samp>(80a70)</samp>
    • runner:
      • Nested tests should throw errors  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4262 <samp>(8ac9f)</samp>
      • Removes deprecated error option from TaskResult  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4313 <samp>(4cee6)</samp>
    • vitest:
      • Run globalSetup from the root config even if it's not in a workspace  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4325 <samp>(4293e)</samp>
        View changes on GitHub
    Open source โ†’
  40. 1.0.0-beta.213 Oct 2023pre-release
    Release notes

       ๐Ÿšจ Breaking Changes

    • Enable coverage.all by default  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4265 <samp>(5a741)</samp>

       ๐Ÿš€ Features

    • Add Marko example and include code coverage for Marko files  -  by @DylanPiercey in https://github.com/vitest-dev/vitest/issues/4263 <samp>(eac77)</samp>
    • expect: Support expect.closeTo api  -  by @Dunqing and golebiowskib in https://github.com/vitest-dev/vitest/issues/4260 <samp>(7f91c)</samp>

       ๐Ÿž Bug Fixes

    • browser:
      • Improve error handling and don't rely on Node.js builtin modules in browser mode  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4244 <samp>(e7e8c)</samp>
    • runner:
      • Fixture needs to be initialized for each test  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4250 <samp>(76a93)</samp>
    • vitest:
      • Deduplicate vitest when running globally or in a workspace  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4238 <samp>(93504)</samp>
      • Print file path instead of "unknown test" when logging  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4146 <samp>(ec2e8)</samp>
      • Failed to load custom environment from js/ts file  -  by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4255 <samp>(da8d0)</samp>
      • Support assets in new URL in Vite 5  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4258 <samp>(d280f)</samp>
      • Correctly hoist vi.hoisted if assigned to a variable  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4285 <samp>(ff93a)</samp>
        View changes on GitHub
    Open source โ†’
  41. 1.0.0-beta.13 Oct 2023pre-release
    Release notes

       ๐Ÿž Bug Fixes

    • expect:
    • vite-node:
      • Have a separate cache for web/ssr transforms  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4221 <samp>(ca5db)</samp>
      • Mjs files watch not work  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3982 <samp>(77ea9)</samp>
        View changes on GitHub
    Open source โ†’
  42. 1.0.0-beta.02 Oct 2023pre-release
    Release notes

    This is a beta release for upcoming 1.0.0 version. Use beta dist-tag when installing Vitest: npm install --save-dev vitest@beta.

       ๐Ÿšจ Breaking Changes

    • Support multiple parallel child_process  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3925 <samp>(8b4a4)</samp>
      • If you have to disable threads (if you use canvas package, for example), this should improve your speed tremendously.
      • useFakeTimers() no longer automatically mocks process.nextTick. Users can still mock it by explicitly specifying useFakeTimers({ toFake: ['nextTick'] })
    • Add support for pool and poolOptions, remove old flags  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4172 <samp>(114a9)</samp>
      • This removes a lot of configuration options to make it easier to configure the runner to your needs. Please, have a look at migration examples if you rely on --threads or other related flags.
        • --threads is now --pool=threads
        • --no-threads is now --pool=forks
        • --single-thread is now --poolOptions.threads.singleThread
        • --experimental-vm-threads is now --pool=vmThreads
        • --experimental-vm-worker-memory-limit is now --poolOptions.vmThreads.memoryLimit
        • --isolate is now --poolOptions.<pool-name>.isolate and browser.isolate
        • test.maxThreads is now test.poolOptions.<pool-name>.maxThreads
        • test.minThreads is now test.poolOptions.<pool-name>.minThreads
        • test.useAtomics is now test.poolOptions.<pool-name>.useAtomics
        • test.poolMatchGlobs.child_process is now test.poolMatchGlobs.forks
        • test.poolMatchGlobs.experimentalVmThreads is now test.poolMatchGlobs.vmThreads
    • Make snapshots more visually pleasing by @sheremet-va in https://github.com/vitest-dev/vitest/pull/3961
      • This will probably cause a lot of test mismatches. Quotes in snapshots are no longer escaped, and all snapshots use backtick quotes (`) even if the string is just a single line. Please, read the PR description for a way to use the previous behavior if you have problems upgrading.
    • runner: Correctly process custom tasks, update runner hooks naming by @sheremet-va in https://github.com/vitest-dev/vitest/pull/4076
      • This PR updates the names for most of the methods on a custom runner (Test -> Task).
      • It also improves the flow for creating your custom tasks like benchmarks using createTaskCollector utility. This is primarily an advanced API for library authors.
      • If you use @vitest/snapshot separately, you will also need to update its usage. You no longer need to extend SnapshotClient to override equalityCheck method - just pass it down as an isEqual option. Also some of the public API methods were renamed for clarity.
      • If you have any questions, please, read the PR description first.

       ๐Ÿš€ Features

    • Include "vitest" in the process name  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4191 <samp>(404c1)</samp>
    • runner: Improve text.extend types  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4176 <samp>(bbb43)</samp>
    • vitest: Expose getBenchFn, getBenchOptions  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4208 <samp>(8e5e4)</samp>

       ๐Ÿž Bug Fixes

    • Don't optimize vue when using optimizer  -  by @sheremet-va <samp>(4e941)</samp>
    • Overwrite global URL with environment's  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4164 <samp>(6a66b)</samp>
    • Correctly resolve external dependencies loaded by custom environments  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4196 <samp>(39647)</samp>
    • Add multiple globals in VM+JSDOM  -  by @nstepien in https://github.com/vitest-dev/vitest/issues/4199 and https://github.com/vitest-dev/vitest/issues/4202 <samp>(fc947)</samp>
    • Ignore "plugins" field in snapshotFormat option  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4204 <samp>(db1ff)</samp>
    • nextTick mocking error message to mention correct config option  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4215 <samp>(98fe3)</samp>
    • happy-dom:
      • Don't crash when calling useFakeTimers with empty config  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4214 <samp>(2e1a1)</samp>
    • runner:
      • The fixture of test.extend should be init once time in all test  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4168 <samp>(a5979)</samp>
    • vitest:
      • Make @types/node optional  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4210 <samp>(a5383)</samp>
      • Inline chai types instead of using @types/chai  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4209 <samp>(5f477)</samp>
      • Don't initialize globalSetup if workspace doesn't run tests  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4213 <samp>(06461)</samp>
        View changes on GitHub
    Open source โ†’
  43. 0.34.629 Sept 2023
    Release notes

       ๐Ÿž Bug Fixes

    • Overwrite global URL with environment's  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4164 <samp>(cbe13)</samp>
    • Correctly resolve external dependencies loaded by custom environments  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4196 <samp>(e3408)</samp>
    • runner: The fixture of test.extend should be init once time in all test  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4168 <samp>(730b2)</samp>
        View changes on GitHub
    Open source โ†’
  44. 0.34.521 Sept 2023
    Release notes

       ๐Ÿš€ Features

    • config:
      • Add diff option  -  by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4063 <samp>(b50cf)</samp>
    • coverage:
      • Add coverage['100'] to istanbul provider  -  by @marcelobotega in https://github.com/vitest-dev/vitest/issues/4109 <samp>(a7e09)</samp>
    • vitest:
      • Support vi.waitFor method  -  by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4113 <samp>(d79cb)</samp>
      • Allow using unprocessed environment files  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4098 <samp>(1aee1)</samp>
      • Support vi.waitUntil method  -  by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/4129 <samp>(e0ac9)</samp>

       ๐Ÿž Bug Fixes

    • Update HappyDOMOptions to be compatible with v12  -  by @anthonyblond in https://github.com/vitest-dev/vitest/issues/4135 <samp>(e8797)</samp>
    • Print value shape when .resolves and .rejects fails  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4137 <samp>(e649d)</samp>
    • docs:
      • Fix lint errors on onConsoleLog example  -  by @marcelobotega in https://github.com/vitest-dev/vitest/issues/4116 <samp>(ba1e7)</samp>
    • expect:
      • Improve the error message when nothing is thrown when testing toThrow  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3979 <samp>(725a0)</samp>
    • happy-dom:
      • Catch errors in happy-dom  -  by @capricorn86 in https://github.com/vitest-dev/vitest/issues/4140 <samp>(c21c0)</samp>
    • runner:
      • Restore leading space in testNamePattern  -  by @segrey in https://github.com/vitest-dev/vitest/issues/4103 and https://github.com/vitest-dev/vitest/issues/4104 <samp>(3c305)</samp>
      • test.extend doesn't work in hooks without test  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4065 <samp>(175c7)</samp>
    • snapshot:
      • Support mix of normal/with placeholders snapshots  -  by @RobertPechaCZ in https://github.com/vitest-dev/vitest/issues/4118 <samp>(01e01)</samp>
    • ui:
      • Correctly render ansi diff  -  by @so1ve and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3810 <samp>(8c315)</samp>
    • vite-node:
      • Export SourceMapInput to fix CYCLIC_CROSS_CHUNK_REEXPORT  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4128 <samp>(ca70a)</samp>
      • Align vite dependency version with vitest  -  by @sheremet-va <samp>(90ff8)</samp>
    • vitest:
      • Rerun tests if a file loaded with query changes  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4130 <samp>(a084c)</samp>
      • Inject "define" in workspaces  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4096 <samp>(b4d5a)</samp>

       ๐ŸŽ Performance

    • Use lazy require in vm pool  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4136 <samp>(21ba4)</samp>
        View changes on GitHub
    Open source โ†’
  45. 0.34.48 Sept 2023
    Release notes

       ๐Ÿž Bug Fixes

    • Resolving dep optimizer issues with workspace  -  by @thebanjomatic in https://github.com/vitest-dev/vitest/issues/4036 <samp>(0c13c)</samp>
    • Don't process config file twice  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4077 <samp>(a84a8)</samp>
    • coverage:
      • Log info only when terminal reporter is used  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/4027 <samp>(9f043)</samp>
    • happy-dom:
      • Use the nodejs console in happy-dom v11  -  by @capricorn86 in https://github.com/vitest-dev/vitest/issues/4090 <samp>(59434)</samp>
    • runner:
      • Incorrect test name pattern matching  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/4071 <samp>(b5bf3)</samp>
    • vite-node:
      • Check more precisely for root/base paths  -  by @danielroe in https://github.com/vitest-dev/vitest/issues/4049 <samp>(80741)</samp>
    • vitest:
      • "vi" doesn't rely on context  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4031 <samp>(0d0f3)</samp>
      • Only override ssr.optimizer instead of the whole ssr object  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4080 <samp>(410bc)</samp>
      • Don't start the server when optimizer is enabled  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4095 <samp>(00e81)</samp>
      • Set SSR env only when transformMode is ssr  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4083 <samp>(f8ea7)</samp>
      • Show error when calling API on files that user has no access to  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4085 <samp>(8b39c)</samp>
    • web-worker:
      • Don't rely on browser API when it's not provided  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/4014 <samp>(e78a4)</samp>
        View changes on GitHub
    Open source โ†’
  46. 0.34.325 Aug 2023
    Release notes

       ๐Ÿš€ Features

    • coverage: Add allowExternal option  -  by @vojvodics and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3894 <samp>(c03fa)</samp>
    • vitest: Export all reporters in vitest/reporters  -  by @Dunqing and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3980 <samp>(5704b)</samp>

       ๐Ÿž Bug Fixes

    • Should remove mockPath from callstack whether success or failed  -  by @miserylee and lijifei in https://github.com/vitest-dev/vitest/issues/3971 <samp>(5eb85)</samp>
    • Add workspace config files to default coverage excludes  -  by @FelixGraf and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3973 <samp>(20263)</samp>
    • Report file error as a <failure> on JUnit  -  by @3c1u in https://github.com/vitest-dev/vitest/issues/3997 <samp>(00c43)</samp>
    • jsdom: Correctly resolve buffer on typed arrays  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3998 <samp>(b42cf)</samp>
    • ui: Use web hash history in ui  -  by @segevfiner and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3481 and https://github.com/vitest-dev/vitest/issues/3487 <samp>(8caab)</samp>
    • vite-node: Inline HMR types  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3993 <samp>(dff60)</samp>
    • vitest: Correctly resolve optimizer status  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3992 <samp>(74dc5)</samp>
        View changes on GitHub
    Open source โ†’
  47. 0.34.217 Aug 2023
    Release notes

       ๐Ÿš€ Features

    • Allow importing CSS and assets inside external dependencies when using --experimental-vm-threads  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3880 <samp>(f4e6e)</samp>
    • vitest: Allow calling ctx.skip() inside the running test  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3966 <samp>(5c88d)</samp>

       ๐Ÿž Bug Fixes

    • Don't bundle utils' source-map entry  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3865 <samp>(a08e5)</samp>
    • Reduce the memory consumption when running --experimental-vm-threads  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3872 <samp>(d1a08)</samp>
    • Indicator position of error message  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3855 <samp>(3e1e7)</samp>
    • Don't crash when using --experimental-vm-threads, interop CJS default inside node_modules  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3876 <samp>(0c53e)</samp>
    • Don't crash if total memory is not supported  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3879 <samp>(7d1f8)</samp>
    • Check memory and limit value  -  by @sheremet-va <samp>(f8dfb)</samp>
    • Update module warning as it is moved into server config  -  by @jellyfishgh in https://github.com/vitest-dev/vitest/issues/3931 <samp>(3a3eb)</samp>
    • Define process variable and using import.meta.env together did not work  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3944 <samp>(e73ca)</samp>
    • Correctly resolve config in a workspace  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3947 <samp>(1c08d)</samp>
    • Don't crash when calling useFakeTimers in VM pool  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3958 <samp>(91fe4)</samp>
    • Restrict access to file system via API  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3956 <samp>(bcb41)</samp>
    • Typo of mocks plugin name  -  by @antfu <samp>(3073b)</samp>
    • Build not generated execute.d.ts  -  by @btea in https://github.com/vitest-dev/vitest/issues/3970 <samp>(0f8e6)</samp>
    • css:
      • Don't mock css-module if ?inline query is specified  -  by @thebanjomatic and Adam Hines in https://github.com/vitest-dev/vitest/issues/3952 <samp>(3891d)</samp>
    • expect:
      • Correctly show async matcher diff  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3960 <samp>(9423b)</samp>
    • snapshots:
      • Update inline snapshot correctly  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3887 <samp>(7b740)</samp>
    • ui:
      • Incorrect duration time in vitest ui  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3945 <samp>(35139)</samp>
      • Add support for ui coverage with subdir option  -  by @userquin in https://github.com/vitest-dev/vitest/issues/3917 <samp>(6ecfc)</samp>
    • vitest:
      • Use esm module resolution to resolve env  -  by @danielroe in https://github.com/vitest-dev/vitest/issues/3951 <samp>(edb32)</samp>
      • Allow rewriting process.env.NODE_MODE when using web transform mode  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3957 <samp>(eca4b)</samp>
      • Only consider cwd when using glob  -  by @g-plane in https://github.com/vitest-dev/vitest/issues/3802 and https://github.com/vitest-dev/vitest/issues/3949 <samp>(15b4f)</samp>
      • Pass environmentOptions to happy-dom integration  -  by @sheremet-va and Raul de Melo in https://github.com/vitest-dev/vitest/issues/3972 <samp>(6a0cb)</samp>
    • web:
      • Correctly resolve assets in new URL  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3950 <samp>(a428f)</samp>

       ๐ŸŽ Performance

    • dot-renderer: Speed up getTests  -  by @gtm-nayan in https://github.com/vitest-dev/vitest/issues/3923 <samp>(e9404)</samp>
        View changes on GitHub
    Open source โ†’
  48. 0.34.11 Aug 2023
    Release notes

       ๐Ÿž Bug Fixes

    • Pass --experimental-vm-worker-memory-limit to tinypool  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3856 <samp>(3c67a)</samp>
        View changes on GitHub
    Open source โ†’
  49. 0.34.01 Aug 2023
    Release notes

       ๐Ÿšจ Breaking Changes

    • Transform mode affects only test files, not regular files  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3491 <samp>(9608b)</samp>
      • transformMode is now moved to server.transformMode. This option is highly discouraged to use. If you need to change the transform mode, use the new option testTransformMode instead to control the mode based on the running test, not the current file path. By default, tests with jsdom or happy-dom use web transform mode, and tests using node or edge environment use ssr mode. If you have a custom environment, it should provide transformMode property.
    • Custom environment now should be processed before Vitest can consume it. It means that you cannot specify a path to a TS file or use import paths that should be processed by Vite.
    • Disable coverage.reportOnFailure by default  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3615 <samp>(0c6f6)</samp>
    • Remove @vitest/coverage-c8 package  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3614 <samp>(a90d6)</samp>
      • @vitest/coverage-c8 is no longer supported. Please, use @vitest/coverage-v8 instead.
    • Support running tests using VM context  -  by @sheremet-va and @dammy001 in https://github.com/vitest-dev/vitest/issues/3203 <samp>(b0929)</samp>
      • To address speed issues in some applications, Vitest now provides experimentalVmThreads pool to run your tests using VM Sandboxes environment. Make sure you understand all pitfalls of this pool before opening an issue.
    • Introduce server option  -  by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3725 <samp>(dc4fa)</samp>
      • Most of deps. options are now moved to server.deps with a deprecation warning. Please, consider using deps.optimizer instead of deps.inline/deps.external. Ideally, we would like to move away from using server.deps.inline altogether.
    • vite-node: Make CLI arguments parsing behavior consistent with node/tsx/ts-node  -  by @rxliuli in https://github.com/vitest-dev/vitest/issues/3574 <samp>(1cd4e)</samp>
      • You now have to provide CLI arguments before the entry point. For example, instead of vite-node index.ts --watch, you now have to do vite-node --watch index.ts.
    • Add preact example, remove optimizer experimental status, enable by default  -  by @sheremet-va and @eryue0220 in https://github.com/vitest-dev/vitest/issues/3854 <samp>(4b946)</samp>
      • deps.optimizer is now enabled by default. This means that Vitest will bundle specified dependencies before running your tests. This field inherits options from optimizeDeps and ssr.optimizeDeps which are populated by other plugins (like, Svelte).

       ๐Ÿš€ Features

    • Support describe.sequential  -  by @fenghan34 and @dammy001 in https://github.com/vitest-dev/vitest/issues/3771 <samp>(86934)</samp>
    • Support config junit reporter className with env  -  by @InfiniteXyy in https://github.com/vitest-dev/vitest/issues/3808 <samp>(e8bc4)</samp>
    • Running vitest with --related --watch reruns non-affected tests if they were changed during a run  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3844 <samp>(c9aea)</samp>

       ๐Ÿž Bug Fixes

    • Isolate workers between envs and workspaces  -  by @AriPerkkio <samp>(ed4e0)</samp>
    • Modify condition  -  by @btea <samp>(a78e6)</samp>
    • Module Graph view is blocking the Console view  -  by @g4rry420 <samp>(3b5f9)</samp>
    • Port the latest defineConfig type from vite  -  by @sodatea in https://github.com/vitest-dev/vitest/issues/3804 <samp>(9c8e3)</samp>
    • Don't overwrite Node.js URL global  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3828 <samp>(cdab4)</samp>
    • ForceRerunTriggers correctly triggers a rerun  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3829 <samp>(17988)</samp>
    • browser:
      • Don't inline magic-string and estree-walker  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3726 <samp>(ee937)</samp>
      • Multi-suite coverage  -  by @elby22 in https://github.com/vitest-dev/vitest/issues/3806 <samp>(5de9a)</samp>
    • core:
    • coverage:
      • V8 provider to pick source maps without url query params  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3784 <samp>(280e6)</samp>
      • Update istanbul-lib-instrument to v6 to fix vulnerable dependency  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3814 <samp>(f3bd9)</samp>
      • Exclude vite virtual modules by default  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3794 <samp>(3c851)</samp>
    • node:
    • vite-node:
      • Always treat node_modules as modulesDirectory  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3830 <samp>(51ab8)</samp>
      • Normalize drive letter to keep the same reference to a module  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3836 <samp>(45521)</samp>
      • Correctly resolve hmr filepath  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3834 <samp>(711a6)</samp>
    • watch:
      • Clear screen on all terminals  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3661 <samp>(8bd26)</samp>

       ๐ŸŽ Performance

    • Deprecate deps.registerNodeLoader  -  by @sheremet-va <samp>(7f45b)</samp>
      • This option was introduced to support aliasing inside external packages. Please, use deps.optimizer.web instead. If you test Node.js applications, consider adding external packages to server.deps.inline.
        View changes on GitHub
    Open source โ†’
  50. 0.33.06 Jul 2023
    Release notes

       ๐Ÿšจ Breaking Changes

    • Revert default include patterns  -  by @so1ve #3729
      • 0.32.0 changed the default include globs to be compatible with Jest. After a discussion with the community, we are reverting this change because it turned out to be non-intuitive.

       ๐Ÿž Bug Fixes

        View changes on GitHub
    Open source โ†’
  51. 0.32.43 Jul 2023
    Release notes

       ๐Ÿž Bug Fixes

        View changes on GitHub
    Open source โ†’
  52. 0.32.33 Jul 2023
    Release notes

       ๐Ÿš€ Features

    • Add concurrent option to sequence config  -  by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3604 <samp>(f427f)</samp>
    • Introduce global configuration for retry setting  -  by @imentu and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3598 and https://github.com/vitest-dev/vitest/issues/3603 <samp>(9a117)</samp>
    • Don't rely on util package in @vitest/utils  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3685 <samp>(f91da)</samp>
    • Support accessing other fixtures in fixture function  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3651 <samp>(1621c)</samp>
    • Support use function/class as bench name  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3711 <samp>(a749a)</samp>
    • reporters: Show full test suite when testing 1 spec file at a time  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3543 <samp>(7531c)</samp>
    • runner: Support test.extend  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3554 <samp>(2db1a)</samp>

       ๐Ÿž Bug Fixes

    • Remove "concordance" from dependencies list  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3597 <samp>(969dc)</samp>
    • Show diff correctly  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3620 <samp>(73dd4)</samp>
    • Util import  -  by @fubhy in https://github.com/vitest-dev/vitest/issues/3621 <samp>(2fb4c)</samp>
    • Compat with frozen Math  -  by @turadg in https://github.com/vitest-dev/vitest/issues/3527 <samp>(0db67)</samp>
    • CTRL+C to terminate run  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3642 <samp>(fa663)</samp>
    • Run mode stuck in TTY terminals  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3690 <samp>(141a8)</samp>
    • Use first stack frame in json reporter  -  by @tim-smart in https://github.com/vitest-dev/vitest/issues/3645 <samp>(80ea7)</samp>
    • Print actual number for toBeCalledTimes  -  by @antfu in https://github.com/vitest-dev/vitest/issues/3696 <samp>(d3640)</samp>
    • benchmark:
      • Don't fail when running correct benchmarks  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3629 <samp>(edad9)</samp>
    • browser:
      • Correctly print diff  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3627 <samp>(d756e)</samp>
      • Esm injector doesn't replace class expressions  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3641 <samp>(5c0ac)</samp>
      • Transform superclass identifier  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3681 <samp>(a1e04)</samp>
    • coverage:
      • v8 to prevent crash on dynamic CJS files  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3657 <samp>(40f18)</samp>
    • runner:
      • Make the default value of retry and repeats 0  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3638 <samp>(6d146)</samp>
    • utils:
      • Respect all flags in format function  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3695 <samp>(91e16)</samp>
    • watch:
      • Cancel using h key  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3618 <samp>(60c36)</samp>
        View changes on GitHub
    Open source โ†’
  53. 0.32.216 Jun 2023
    Release notes

       ๐Ÿž Bug Fixes

        View changes on GitHub
    Open source โ†’
  54. 0.32.116 Jun 2023
    Release notes

       ๐Ÿš€ Features

    • Export registerConsoleShortcuts from vitest/node  -  by @deot in https://github.com/vitest-dev/vitest/issues/3563 <samp>(bc49b)</samp>
    • expect: Support expect.unreachable  -  by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3556 <samp>(8e385)</samp>
    • runner: describe/test name support anonymous function  -  by @btea in https://github.com/vitest-dev/vitest/issues/3562 <samp>(3d436)</samp>

       ๐Ÿž Bug Fixes

    • Avoid call stack recursion with large error (fix: #3060)  -  by @nathanmmiller and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3078 and https://github.com/vitest-dev/vitest/issues/3060 <samp>(02196)</samp>
    • Automatically remove define related configuration  -  by @btea in https://github.com/vitest-dev/vitest/issues/3552 <samp>(368b8)</samp>
    • Import performance from perf_hooks  -  by @Max10240 and wangbaolong.wbl in https://github.com/vitest-dev/vitest/issues/3578 and https://github.com/vitest-dev/vitest/issues/3579 <samp>(24ec8)</samp>
    • Revert concordance diff, use jest's diff output  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3582 <samp>(9c7ea)</samp>
    • Typo in config suggestion  -  by @Krisell in https://github.com/vitest-dev/vitest/issues/3583 <samp>(68985)</samp>
    • browser:
      • Change optimized deps to use vitest  -  by @userquin in https://github.com/vitest-dev/vitest/issues/3580 <samp>(b4ac8)</samp>
      • Access vi_inject only if it was injected  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3587 <samp>(d9e14)</samp>
    • mocker:
      • Respect namespace import when hoisting vi.mock  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3547 <samp>(158c4)</samp>
    • ui:
      • Navigate to dashboard when re-running tests from coverage page  -  by @userquin in https://github.com/vitest-dev/vitest/issues/3529 <samp>(bc283)</samp>
    • vite-node:
      • Correctly resolve virtual modules  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3544 <samp>(0cbb0)</samp>
      • Fix errors caused by commonjs export circular references  -  by @rxliuli in https://github.com/vitest-dev/vitest/issues/3570 <samp>(b097c)</samp>
        View changes on GitHub
    Open source โ†’
  55. 0.32.06 Jun 2023
    Release notes

       ๐Ÿšจ Breaking Changes

    • Throw an error, if the module cannot be resolved  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3307 <samp>(1ad63)</samp>
      • Vitest used to fall back to the original import when it could not resolve it to the file path or the virtual module. This leads to hard-to-find module graph mismatches if you had incorrect alias or relied on relative imports to be resolved to the project root (which is usual behavior in TypeScript) because the code accidentally "worked". With this release, Vitest will now throw an error if it cannot resolve the module - there are possible edge cases that are not covered yet, so if you have any problems with this, please open a separate issue with reproduction.
    • Improve globs  -  by @nickmccurdy in https://github.com/vitest-dev/vitest/issues/3392 <samp>(19ecc)</samp>
      • Vitest now has glob patterns similar to Jest for better compatibility. It's possible that some files will be considered test files when previously they were not. For example, Vitest now considers test.js to be a test file. Also any file in __tests__ is now considered to be a test, not just files with test or spec suffix.
    • Add @vitest/coverage-v8 package  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3339 <samp>(82112)</samp>
      • Vitest now uses v8 code coverage directly for better performance. @vitest/coverage-c8 is deprecated as Vitest no longer uses c8 package for coverage output. It will not be updated anymore, and Vitest will fail in the next version if the user has c8 as their coverage provider. Please, install the new @vitest/coverage-v8 package if you previously used @vitest/coverage-c8.
    • mocker: Don't restore mock to the original if the module is automocked  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3518 <samp>(c1004)</samp>
      • spy.mockRestore on auto-mocked named exports will no longer restore their implementation to the actual function. This behavior better matches what Jest does.

       ๐Ÿš€ Features

    • Support ssr optimizer  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3490 <samp>(89842)</samp>
    • Image type add apng  -  by @btea in https://github.com/vitest-dev/vitest/issues/3498 <samp>(a53c2)</samp>
    • expect: Support expect.soft  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3507 <samp>(7c687)</samp>
    • runner: Support using function/class as describe/test name  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3497 <samp>(15253)</samp>

       ๐Ÿž Bug Fixes

    • The cli option is passed to coverage.exclude  -  by @btea in https://github.com/vitest-dev/vitest/issues/3506 <samp>(c37cd)</samp>
    • optimizer: Always respect optimizeDeps even if include/exclude is overridden  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3488 <samp>(eb285)</samp>
    • runner: Ensure Vitest is deduped  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3489 <samp>(2deb7)</samp>
    • ui: Don't cache coverage assets  -  by @userquin in https://github.com/vitest-dev/vitest/issues/3508 <samp>(952b5)</samp>
    • vite-node: Circular import stuck  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3480 <samp>(50f07)</samp>
    • watch: Junit reporter fails to re-generate report  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3496 <samp>(5b73c)</samp>
        View changes on GitHub
    Open source โ†’
  56. 0.31.41 Jun 2023
    Release notes

       ๐Ÿš€ Features

    • Enable experimentalOptimizer  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3413 <samp>(5a894)</samp>

       ๐Ÿž Bug Fixes

    • vite-node: Deps.inline doesn't work  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3485 <samp>(be930)</samp>
        View changes on GitHub
    Open source โ†’
  57. 0.31.331 May 2023
    Release notes

       ๐Ÿš€ Features

    • Support VITE_NODE_DEPS_MODULE_DIRECTORIES from .npmrc  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3471 <samp>(393bf)</samp>

       ๐Ÿž Bug Fixes

    • logger: Print unhandled errors before summary  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3474 <samp>(4c9a7)</samp>
    • runner: Suite options do not propagate to nested suites (fix: #3467)  -  by @xsjcTony in https://github.com/vitest-dev/vitest/issues/3473 and https://github.com/vitest-dev/vitest/issues/3467 <samp>(9fb9d)</samp>
    • vite-node: Clear importers when invalidating module  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3475 <samp>(add29)</samp>
        View changes on GitHub
    Open source โ†’
  58. 0.31.230 May 2023
    Release notes

       ๐Ÿš€ Features

    • Throw error if using inline snapshot inside of test.each or describe.each  -  by @fenghan34 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3360 <samp>(7c2f7)</samp>
    • Pass down meta information to Node.js process  -  by @sheremet-va and @dammy001 in https://github.com/vitest-dev/vitest/issues/3449 <samp>(e39ad)</samp>
    • coverage: Add reportOnFailure option  -  by @AriPerkkio and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3453 <samp>(1988f)</samp>
    • dev: Add moduleDirectories option to the vitest config  -  by @fooddilsn and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3337 <samp>(b3602)</samp>

       ๐Ÿž Bug Fixes

    • Don't print empty diff  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3437 <samp>(32b53)</samp>
    • Don't restore methods in automocked dependencies  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3438 <samp>(d1afd)</samp>
    • Dot reporter scrollback buffer spam  -  by @gtm-nayan in https://github.com/vitest-dev/vitest/issues/3415 <samp>(e6792)</samp>
    • Gracefully exit when first SIGINT is received  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3407 <samp>(a2cc2)</samp>
    • rejects & resolves breaks with thenable objects  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3456 <samp>(4e996)</samp>
    • Prevent birpc timeouts when Math.random mock is not restored  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3460 <samp>(cd5d5)</samp>
    • Assertion diff message now handle non writable property correctly  -  by @PCreations in https://github.com/vitest-dev/vitest/issues/3422 <samp>(f75ab)</samp>
    • Extend logging of process timeout errors  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3452 <samp>(42643)</samp>
    • Support requiring files with less extension  -  by @rluvaton in https://github.com/vitest-dev/vitest/issues/3465 <samp>(4d045)</samp>
    • cli:
      • Improve colors used when erroring  -  by @ghiscoding and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3349 <samp>(16681)</samp>
    • runner:
      • Suite timeout does not take effect  -  by @btea in https://github.com/vitest-dev/vitest/issues/3455 <samp>(82547)</samp>
    • spy:
      • Don't print received calls if there are no calls  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3405 <samp>(41e11)</samp>
    • typecheck:
      • Show tsc errors not related to test files  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3441 <samp>(a1da5)</samp>
    • types:
      • Fix PartialMock with async TReturns  -  by @ghry5 in https://github.com/vitest-dev/vitest/issues/3462 <samp>(b664d)</samp>
    • vite-node:
      • Circular import stuck  -  by @Dunqing in https://github.com/vitest-dev/vitest/issues/3418 <samp>(632ee)</samp>
      • Coerce to string in import(dep)  -  by @jcbhmr and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3430 <samp>(b72eb)</samp>
      • Don't remove sourcemap string in source code  -  by @rxliuli and @sheremet-va in https://github.com/vitest-dev/vitest/issues/2918 and https://github.com/vitest-dev/vitest/issues/3379 <samp>(02dc9)</samp>
      • Don't externalize "dist" by default  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3446 <samp>(306b2)</samp>
        View changes on GitHub
    Open source โ†’
  59. 0.31.117 May 2023
    Release notes

       ๐Ÿš€ Features

    • watch: Press r should rerun current pattern tests  -  by @Dunqing and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3305 <samp>(69d27)</samp>

       ๐Ÿž Bug Fixes

    • Make sure thrown error is an object  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3298 <samp>(a93be)</samp>
    • Remove duplicate type  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3303 <samp>(5382e)</samp>
    • Throw an error, if tests are collected with a different vitest version  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3301 <samp>(708b1)</samp>
    • Support application/x-gzip metadata in html report  -  by @mzanelee and Michael Lee in https://github.com/vitest-dev/vitest/issues/3333 <samp>(5bf7e)</samp>
    • Correctly restore vi.fn implementation  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3341 <samp>(2aff8)</samp>
    • Display error message correctly  -  by @btea in https://github.com/vitest-dev/vitest/issues/3314 <samp>(a5b3d)</samp>
    • Exclude cwd from test name filter  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3353 <samp>(324a9)</samp>
    • Check error type before modifying it  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3385 <samp>(c44d9)</samp>
    • toMatchInlineSnapshot fails when file path includes parentheses  -  by @pacexy in https://github.com/vitest-dev/vitest/issues/3370 and https://github.com/vitest-dev/vitest/issues/3371 <samp>(dcf13)</samp>
    • Stop spying on a method, when it's restored  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3386 <samp>(2cb1a)</samp>
    • Test repeats  -  by @fenghan34 in https://github.com/vitest-dev/vitest/issues/3369 <samp>(fb8fc)</samp>
    • browser:
      • Throw an error if test failed to load  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3390 <samp>(b354b)</samp>
      • Keep default export when rewriting exports  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3389 <samp>(6501d)</samp>
    • cli:
      • Improve cac errors when mixing boolean and dot notation  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3302 <samp>(93fbd)</samp>
    • reporter:
      • Prevent deleting test reports stored in coverage directory  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3331 <samp>(ddbba)</samp>
    • typecheck:
      • Correctly resolve custom tsconfig path  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3342 <samp>(c53ae)</samp>
    • vite-node:
      • Allow returning id not wrapped in promise  -  by @danielroe in https://github.com/vitest-dev/vitest/issues/3312 <samp>(9836c)</samp>
        View changes on GitHub
    Open source โ†’
  60. 0.31.03 May 2023
    Release notes

       ๐Ÿšจ Breaking Changes

    • Remove browser from allowed pools inside poolMatchGlob config option. Please, use Vitest workspaces for running tests in the browser.

    • Move assertion declarations to expect package  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3294 <samp>(cf3af)</samp>

      • The change should be minor:
      - declare namespace Vi {
      + declare module 'vitest' {
         interface Assertion<T = any> extends CustomMatchers<T> {}
         interface AsymmetricMatchersContaining extends CustomMatchers {}
      }
      

       ๐Ÿš€ Features

    • Update mock implementation to support ESM runtime, introduce "vi.hoisted"  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3258 <samp>(0c09a)</samp>
      • Bypass ESM import order restriction with vi.hoisted to run code before imports are executed:
      vi.hoisted(() => vi.setSystemTime(new Date(2022, 1, 1)))
      
      You can also use it to pass variables to vi.mock:
      const { mockedMethod } = vi.hoisted(() => {
        return { mockedMethod: vi.fn() }
      })   
      vi.mock('./path/to/module.js', () => {
        return { originalMethod: mockedMethod }
      })
      
    • Add repeat method to tests  -  by @samkevin1 in https://github.com/vitest-dev/vitest/issues/2652 <samp>(7c8f0)</samp>
    • Add an option to hide skipped test lines  -  by @g4rry420 and @sheremet-va in https://github.com/vitest-dev/vitest/issues/2745 <samp>(9bdb1)</samp>
    • coverage: Watermarks for c8  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3254 <samp>(730af)</samp>
    • ui: Add html coverage  -  by @userquin and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3071 <samp>(e24cd)</samp>
    • watch: Test run cancelling, feat: --bail option for cancelling test run  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3163 <samp>(8d460)</samp>

       ๐Ÿž Bug Fixes

    • Don't call global setup teardown twice  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3188 <samp>(ba3d1)</samp>
    • Reporter to log version before provider initalizations  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3131 <samp>(481b1)</samp>
    • Throw an error if Vitest cannot access its internal state  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3250 <samp>(fbb14)</samp>
    • Warning suppression broken  -  by @IceQub3 in https://github.com/vitest-dev/vitest/issues/3270 and https://github.com/vitest-dev/vitest/issues/3271 <samp>(036de)</samp>
    • Show correct diff in "toHaveBeenCalledWith"  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3289 <samp>(19fcd)</samp>
    • Don't print esm warning, if package name is not found  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3292 <samp>(62c14)</samp>
    • Support exactOptionalPropertyTypes  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3293 <samp>(ba81d)</samp>
    • Don't inline vite hmr and rollup types  -  by @sheremet-va in https://github.com/vitest-dev/vitest/issues/3291 <samp>(1f118)</samp>
    • browser:
      • Failing to load vitest/utils  -  by @userquin in https://github.com/vitest-dev/vitest/issues/3190 <samp>(78bad)</samp>
    • coverage:
      • thresholdAutoUpdate to work with perFile  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3182 <samp>(29eeb)</samp>
      • Throw error if fail to load built-in provider  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3217 <samp>(0a287)</samp>
      • Stackblitz hangs with c8  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3225 <samp>(d9fda)</samp>
      • C8 to ignore vite's generated helpers  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3241 <samp>(21942)</samp>
      • Workspaces c8 source maps  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3226 <samp>(efce3)</samp>
    • docs:
      • Correct typo and broken link to WebdriverIO  -  by @nathanbabcock in https://github.com/vitest-dev/vitest/issues/3275 <samp>(c7da1)</samp>
    • spy:
      • Update to set initial implementation through normal logic  -  by @Codex- in https://github.com/vitest-dev/vitest/issues/3260 and https://github.com/vitest-dev/vitest/issues/3263 <samp>(c759a)</samp>
    • vite-node:
    • vitest:
      • Also check for vite relative to vitest package  -  by @JoshuaKGoldberg and @sheremet-va in https://github.com/vitest-dev/vitest/issues/3274 <samp>(a3393)</samp>
    • watch:
      • Run test files when added to filesystem  -  by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/3189 <samp>(7b2c8)</samp>
        View changes on GitHub
    Open source โ†’