Skip to content

isolate

  • 类型: boolean
  • 默认值: true
  • 命令行终端: --no-isolate, --isolate=false

Run tests in an isolated environment. This option has no effect on vmThreads and vmForks pools.

Disabling this option might improve performance if your code doesn't rely on side effects (which is usually true for projects with node environment).

TIP

You can disable isolation for specific test files by using Vitest workspaces and disabling isolation per project.