Files
orca/config/scripts/test-runtime/execution-policy/vitest-shared-worker-setup-runner.mjs
Neil 2ceaff4869 refactor(renderer): group workspace creation and launch owners (#40688)
* refactor(renderer): group workspace creation and launch owners

* refactor(renderer): combine concrete workspace naming imports
2026-11-10 00:31:11 -08:00

17 lines
528 B
JavaScript

import { TestRunner } from 'vitest'
export default class SharedWorkerSetupRunner extends TestRunner {
importFile(filepath, source) {
if (source === 'setup') {
// Warm transforms can key setup roots by a different URL than Vitest invalidates.
const modules = this.moduleRunner.evaluatedModules
for (const node of modules.getModulesByFile(filepath) ?? []) {
if (node.evaluated) {
modules.invalidateModule(node)
}
}
}
return super.importFile(filepath, source)
}
}