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

Method onInit

packages/vitest/src/node/reporters/dot.ts:24–35  ·  view source on GitHub ↗
(ctx: Vitest)

Source from the content-addressed store, hash-verified

22 private finishedTests = new Set<TestCase['id']>()
23
24 onInit(ctx: Vitest): void {
25 super.onInit(ctx)
26
27 if (this.isTTY) {
28 this.renderer = new WindowRenderer({
29 logger: ctx.logger,
30 getWindow: () => this.createSummary(),
31 })
32
33 this.ctx.onClose(() => this.renderer?.stop())
34 }
35 }
36
37 // Ignore default logging of base reporter
38 printTestModule(): void {}

Callers

nothing calls this directly

Calls 3

createSummaryMethod · 0.95
onCloseMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected