MCPcopy
hub / github.com/vitest-dev/vitest / setupEnv

Function setupEnv

packages/vitest/src/runtime/setup-common.ts:33–42  ·  view source on GitHub ↗
(env: Record<string, any>)

Source from the content-addressed store, hash-verified

31}
32
33function setupEnv(env: Record<string, any>) {
34 const state = getWorkerState()
35 // same boolean-to-string assignment as VitestPlugin.configResolved
36 const { PROD, DEV, ...restEnvs } = env
37 state.metaEnv.PROD = PROD
38 state.metaEnv.DEV = DEV
39 for (const key in restEnvs) {
40 state.metaEnv[key] = env[key]
41 }
42}
43
44export async function loadDiffConfig(
45 config: SerializedConfig,

Callers 1

setupCommonEnvFunction · 0.85

Calls 1

getWorkerStateFunction · 0.90

Tested by

no test coverage detected