(lines: Array<string>)
| 320 | } |
| 321 | |
| 322 | export function getTopFrame(lines: Array<string>): Frame | null { |
| 323 | for (const line of lines) { |
| 324 | if (line.includes(PATH_NODE_MODULES) || line.includes(PATH_JEST_PACKAGES)) { |
| 325 | continue; |
| 326 | } |
| 327 | |
| 328 | const parsedFrame = stackUtils.parseLine(line.trim()); |
| 329 | |
| 330 | if (parsedFrame && parsedFrame.file) { |
| 331 | if (parsedFrame.file.startsWith('file://')) { |
| 332 | parsedFrame.file = slash(fileURLToPath(parsedFrame.file)); |
| 333 | } |
| 334 | return parsedFrame as Frame; |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | return null; |
| 339 | } |
| 340 | |
| 341 | export function formatStackTrace( |
| 342 | stack: string, |
no outgoing calls
no test coverage detected