File tree Expand file tree Collapse file tree 5 files changed +5
-7
lines changed
Expand file tree Collapse file tree 5 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1- export { VitestExecutor , ExecuteOptions } from '../runtime/execute'
1+ export { VitestExecutor } from '../runtime/execute'
Original file line number Diff line number Diff line change 1- import type { ExecuteOptions } from 'vitest/execute'
21import { VitestExecutor } from 'vitest/execute'
32
43export class InlineWorkerRunner extends VitestExecutor {
5- constructor ( options : ExecuteOptions , private context : any ) {
4+ constructor ( options : any , private context : any ) {
65 // share the same mocker as main executor
76 const mocker = ( globalThis as any ) . __vitest_mocker__
87 super ( options )
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ export function createSharedWorkerConstructor(): typeof SharedWorker {
135135
136136 return runner . executeFile ( fsPath ) . then ( ( ) => {
137137 // worker should be new every time, invalidate its sub dependency
138- runnerOptions . moduleCache ! . invalidateSubDepTree ( [
138+ runnerOptions . moduleCache . invalidateSubDepTree ( [
139139 fsPath ,
140140 runner . mocker . getMockPath ( fsPath ) ,
141141 ] )
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { readFileSync as _readFileSync } from 'node:fs'
22import type { WorkerGlobalState } from 'vitest'
33import ponyfillStructuredClone from '@ungap/structured-clone'
44import createDebug from 'debug'
5- import type { ExecuteOptions } from 'vitest/execute'
65import type { CloneOption } from './types'
76
87// keep the reference in case it was mocked
@@ -80,7 +79,7 @@ export function createMessageEvent(
8079 }
8180}
8281
83- export function getRunnerOptions ( ) : ExecuteOptions {
82+ export function getRunnerOptions ( ) : any {
8483 const state = getWorkerState ( )
8584 const { config, rpc, moduleCache } = state
8685
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ export function createWorkerConstructor(
132132
133133 return runner . executeFile ( fsPath ) . then ( ( ) => {
134134 // worker should be new every time, invalidate its sub dependency
135- runnerOptions . moduleCache ! . invalidateSubDepTree ( [
135+ runnerOptions . moduleCache . invalidateSubDepTree ( [
136136 fsPath ,
137137 runner . mocker . getMockPath ( fsPath ) ,
138138 ] )
You can’t perform that action at this time.
0 commit comments