Update spec reporter relativization

Electron 1.6 changed the reporting from .<anonymous> to
jasmine.Spec.<anonymous>
This commit is contained in:
Wliu 2017-04-07 23:10:57 -04:00 committed by Thomas Johansen
parent 9bc53948b7
commit c638f8693a

View File

@ -21,8 +21,8 @@ formatStackTrace = (spec, message='', stackTrace) ->
lines.shift() if message.trim() is errorMatch?[1]?.trim()
for line, index in lines
# Remove prefix of lines matching: at .<anonymous> (path:1:2)
prefixMatch = line.match(/at \.<anonymous> \(([^)]+)\)/)
# Remove prefix of lines matching: at jasmine.Spec.<anonymous> (path:1:2)
prefixMatch = line.match(/at jasmine\.Spec\.<anonymous> \(([^)]+)\)/)
line = "at #{prefixMatch[1]}" if prefixMatch
# Relativize locations to spec directory