Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/vitest/src/runtime/moduleRunner/startModuleRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ export function startVitestModuleRunner(options: ContextModuleRunnerOptions): Vi
return { externalize: toBuiltin(rawId), type: 'builtin' }
}

// if module is invalidated, the worker will be recreated,
// so cached is always true in a single worker
if (options?.cached) {
return { cache: true }
}

const otelCarrier = traces?.getContextCarrier()
const result = await rpc().fetch(
id,
Expand Down
Loading