This documentation covers Vitest v4 (old version). For the latest version, see https://vitest.dev.

Skip to content

dir ​

  • Type: string
  • CLI: --dir=<path>
  • Default: same as root

Base directory to scan for the test files. You can specify this option to speed up test discovery if your root covers the whole project