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

Function sendLog

packages/vitest/src/runtime/console.ts:108–125  ·  view source on GitHub ↗
(
    type: 'stderr' | 'stdout',
    taskId: string,
    content: string,
    size: number,
    origin?: string,
  )

Source from the content-addressed store, hash-verified

106 }
107
108 function sendLog(
109 type: 'stderr' | 'stdout',
110 taskId: string,
111 content: string,
112 size: number,
113 origin?: string,
114 ) {
115 const timer = timers.get(taskId)!
116 const time = type === 'stderr' ? timer.stderrTime : timer.stdoutTime
117 state().rpc.onUserConsoleLog({
118 type,
119 content: content || '<empty line>',
120 taskId,
121 time: time || RealDate.now(),
122 size,
123 origin,
124 })
125 }
126
127 const stdout = new Writable({
128 write(data, encoding, callback) {

Callers 1

sendBufferFunction · 0.70

Calls 3

stateFunction · 0.70
getMethod · 0.45
onUserConsoleLogMethod · 0.45

Tested by

no test coverage detected