MCPcopy
hub / github.com/vitest-dev/vitest / getWorkerState

Function getWorkerState

packages/browser/src/client/utils.ts:107–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106/* @__NO_SIDE_EFFECTS__ */
107export function getWorkerState(): WorkerGlobalState {
108 // @ts-expect-error not typed global
109 const state = window.__vitest_worker__
110 if (!state) {
111 throw new Error('Worker state is not found. This is an issue with Vitest. Please, open an issue.')
112 }
113 return state
114}

Callers 12

elementFunction · 0.90
screenshotFunction · 0.90
markFunction · 0.90
rpcFunction · 0.90
triggerCommandMethod · 0.90
processTimeoutOptionsFunction · 0.90
tester.tsFile · 0.90
prepareTestEnvironmentFunction · 0.90
cleanupFunction · 0.90
initiateRunnerFunction · 0.90
markFunction · 0.90
ensureAwaitedFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected