metaltest/lib/stackparser.js

9 lines
268 B
JavaScript
Raw Permalink Normal View History

2022-12-07 19:27:53 -05:00
const regAssertParser = /(?<title>.*?)\n+(?<diff>.*?)\n+(?<stacktrace> (?<where>at.*?file:\/\/(?<file>.*?):(?<line>\d+):(?<column>\d+)\)?)\n.*)/s
2022-12-04 23:40:07 -05:00
2022-12-06 12:58:30 -05:00
const stackParser = (stack) => {
const m = stack.match(regAssertParser)
2022-12-04 23:40:07 -05:00
2022-12-07 19:27:53 -05:00
return m.groups
2022-12-04 23:40:07 -05:00
}
export { stackParser }