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

Method onTaskUpdate

packages/vitest/src/api/setup.ts:267–275  ·  view source on GitHub ↗
(packs: TaskResultPack[], events: TaskEventPack[])

Source from the content-addressed store, hash-verified

265 }
266
267 async onTaskUpdate(packs: TaskResultPack[], events: TaskEventPack[]): Promise<void> {
268 if (this.clients.size === 0) {
269 return
270 }
271
272 this.clients.forEach((client) => {
273 client.onTaskUpdate?.(packs, events)?.catch?.(noop)
274 })
275 }
276
277 private sum<T>(items: T[], cb: (_next: T) => number | undefined) {
278 return items.reduce((total, next) => {

Callers 6

BrowserTestRunnerClass · 0.45
sendTasksUpdateFunction · 0.45
onTaskUpdateFunction · 0.45
resolveTestRunnerFunction · 0.45
onTaskUpdateFunction · 0.45
onTaskUpdateFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected