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

Function findTestFileStackTrace

packages/runner/src/utils/collect.ts:235–244  ·  view source on GitHub ↗
(testFilePath: string, error: string)

Source from the content-addressed store, hash-verified

233}
234
235export function findTestFileStackTrace(testFilePath: string, error: string): ParsedStack | undefined {
236 // first line is the error message
237 const lines = error.split('\n').slice(1)
238 for (const line of lines) {
239 const stack = parseSingleStack(line)
240 if (stack && stack.file === testFilePath) {
241 return stack
242 }
243 }
244}

Callers 3

taskFunction · 0.90
initSuiteFunction · 0.90
recordArtifactFunction · 0.90

Calls 1

parseSingleStackFunction · 0.90

Tested by

no test coverage detected