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

Function onConsoleLog

test/cli/test/console.test.ts:100–113  ·  view source on GitHub ↗
(log, type, entity)

Source from the content-addressed store, hash-verified

98 {
99 globals: true,
100 onConsoleLog(log, type, entity) {
101 logs.push({
102 log,
103 type,
104 entity: entity
105 ? {
106 type: entity.type,
107 name: entity.type === 'module'
108 ? relative(entity.project.config.root, entity.moduleId)
109 : entity.name,
110 }
111 : undefined,
112 })
113 },
114 },
115 )
116 expect(stderr).toBe('')

Callers

nothing calls this directly

Calls 1

relativeFunction · 0.70

Tested by

no test coverage detected