close
logo
Rstest
Guide
Config
API
English
简体中文
Guide
Config
API
English
简体中文
logo
Rstest
Overview

Test Configurations

root
name
include
exclude
setupFiles
projects
update
globals
passWithNoTests
includeSource
testNamePattern
env
retry
testTimeout
hookTimeout
maxConcurrency
pool
isolate
testEnvironment
clearMocks
resetMocks
restoreMocks
unstubEnvs
unstubGlobals
coverage
reporters
hideSkippedTests
slowTestThreshold
snapshotFormat
resolveSnapshotPath
printConsoleTrace
onConsoleLog
disableConsoleIntercept

Build Configurations

plugins
source
output
resolve
tools
dev
performance
📝 Edit this page on GitHub
Previous Pagepool
Next PagetestEnvironment

#isolate

  • Type: boolean
  • Default: true
  • CLI: --isolate=false

Run tests in an isolated environment.

By default, Rstest runs each test in an isolated environment, which avoids the impact of some module side effects and helps improve the stability of the test.

If your code has no side effects, turning off this option will help improve performance because module caches can be reused between different test files.

CLI
rstest.config.ts
import { defineConfig } from '@rstest/core';

export default defineConfig({
  isolate: false,
});