unstubEnvs
- 类型:
boolean - 默认值:
false
将在每次测试前调用 vi.unstubAllEnvs()。
js
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
unstubEnvs: true,
},
})WARNING
Be aware that this option may cause problems with async concurrent tests. If enabled, the completion of one test will restore all the values changed with vi.stubEnv, including those currently being used by other tests in progress.
