Change8

v4.0.7

📦 vitestView on GitHub →
7 features🐛 8 fixes1 deprecations🔧 10 symbols

Summary

Vitest v4.0.7 includes several bug fixes, adds new matcher support and jsdom capabilities, and deprecates the `browser.isolate` and `browser.fileParallelism` options.

Migration Steps

  1. Replace any usage of `browser.isolate` and `browser.fileParallelism` with the inherited `isolate` option.
  2. If you relied on the previous behavior of `--execArgv` being a string, update your scripts to pass an array of arguments.
  3. Ensure any custom environment setup accounts for the environment now being created once per worker when `isolate: false`.
  4. No other migration steps required.

✨ New Features

  • Add Locator as a possible element type in `toContainElement()` matcher.
  • CLI now parses `--execArgv` as an array.
  • jsdom now supports `URL.createObjectURL` and `FormData.set(prop, blob)`.
  • Pool avoids the `--require` argument when running in Deno.
  • Typecheck now handles re-runs outside of `tsc`.
  • Bind `process` in case global is overwritten.
  • Create environment once per worker when `isolate: false`.

🐛 Bug Fixes

  • Bind `process` in case global is overwritten.
  • Create environment once per worker with `isolate: false`.
  • Add Locator as a possible element type in `toContainElement()` matcher.
  • Inherit `isolate` option, deprecate `browser.isolate`/`browser.fileParallelism`.
  • CLI parses `--execArgv` as array.
  • jsdom supports `URL.createObjectURL`, `FormData.set(prop, blob)`.
  • Pool avoids `--require` argument when running in Deno.
  • Typecheck handles re-runs outside `tsc`.

🔧 Affected Symbols

processenvironmenttoContainElementbrowser.isolatebrowser.fileParallelismcli.execArgvjsdom.URL.createObjectURLFormData.setpool.requiretypecheck

⚡ Deprecations

  • Deprecate `browser.isolate` and `browser.fileParallelism` options; use the inherited `isolate` setting instead.