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

Method finishSession

packages/vitest/src/node/pools/browser.ts:303–320  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

301 }
302
303 private finishSession(sessionId: string): void {
304 this.readySessions.add(sessionId)
305
306 // the last worker finished running tests
307 if (this.readySessions.size === this.orchestrators.size) {
308 this._otel.span.end()
309 this._promise?.resolve()
310 this._promise = undefined
311 debug?.('[%s] all tests finished running', sessionId)
312 }
313 else {
314 debug?.(
315 `did not finish sessions for ${sessionId}: |ready - %s| |overall - %s|`,
316 [...this.readySessions].join(', '),
317 [...this.orchestrators.keys()].join(', '),
318 )
319 }
320 }
321
322 private runNextTest(method: 'run' | 'collect', sessionId: string): void {
323 const file = this._queue.shift()

Callers 1

runNextTestMethod · 0.95

Calls 5

endMethod · 0.80
keysMethod · 0.80
debugFunction · 0.50
addMethod · 0.45
resolveMethod · 0.45

Tested by

no test coverage detected