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

Function cdpEvent

packages/browser/src/client/client.ts:89–95  ·  view source on GitHub ↗
(event: string, payload: unknown)

Source from the content-addressed store, hash-verified

87 return orchestrator.cleanupTesters()
88 },
89 cdpEvent(event: string, payload: unknown) {
90 const cdp = getBrowserState().cdp
91 if (!cdp) {
92 return
93 }
94 cdp.emit(event, payload)
95 },
96 async resolveManualMock(url: string) {
97 // @ts-expect-error not typed global API
98 const mocker = globalThis.__vitest_mocker__ as ModuleMocker | undefined

Callers

nothing calls this directly

Calls 1

getBrowserStateFunction · 0.90

Tested by

no test coverage detected