Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
Something went wrong. Try again.
588 B · 18 lines
TypeScript
at v1
12345678910111213141516171819import { VitestExecutor } from 'vitest/execute'
export class InlineWorkerRunner extends VitestExecutor { constructor(options: any, private context: any) { super(options) }
prepareContext(context: Record<string, any>) { const ctx = super.prepareContext(context) // not supported for now, we can't synchronously load modules const importScripts = () => { throw new Error('[vitest] `importScripts` is not supported in Vite workers. Please, consider using `import` instead.') } return Object.assign(ctx, this.context, { importScripts, }) }}