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

Method capture

test/test-utils/cli.ts:42–46  ·  view source on GitHub ↗
(source: Source, data: any)

Source from the content-addressed store, hash-verified

40 }
41
42 private capture(source: Source, data: any) {
43 const msg = this.preserveAnsi ? data.toString() : stripVTControlCharacters(data.toString())
44 this[source] += msg
45 this[`${source}Listeners`].forEach(fn => fn())
46 }
47
48 write(data: string) {
49 this.resetOutput()

Callers 3

constructorMethod · 0.95
matchDomainMethod · 0.80
getStableSnapshotFunction · 0.80

Calls 2

fnFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected