Skip to content

Commit

Permalink
refactor: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jan 29, 2024
1 parent 89d5315 commit 2027cd1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/vitest/src/runtime/runVmTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ import { setupCommonEnv } from './setup-common'
export async function run(files: string[], config: ResolvedConfig, executor: VitestExecutor): Promise<void> {
const workerState = getWorkerState()

installSourcemapsSupport({
getSourceMap: source => workerState.moduleCache.getSourceMap(source),
})

await setupCommonEnv(config)

Object.defineProperty(globalThis, '__vitest_index__', {
Expand All @@ -49,6 +45,10 @@ export async function run(files: string[], config: ResolvedConfig, executor: Vit
timers,
}

installSourcemapsSupport({
getSourceMap: source => workerState.moduleCache.getSourceMap(source),
})

await startCoverageInsideWorker(config.coverage, executor)

if (config.chaiConfig)
Expand Down

0 comments on commit 2027cd1

Please sign in to comment.