Skip to content

Commit

Permalink
exception message in json formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
innocentiv committed Nov 7, 2017
1 parent 7bb5a3b commit 54560bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/formatter/json_formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ export default class JsonFormatter extends Formatter {
data.result.duration = testStep.result.duration
}
if (status === Status.FAILED && exception) {
data.result.error_message = exception.stack || exception
let message = exception.message || ''
let stack = exception.stack || ''
message = _.includes(stack, message) ? '' : message + '\n'
data.result.error_message = message + stack || exception
}
}
if (_.size(testStep.attachments) > 0) {
Expand Down

0 comments on commit 54560bd

Please sign in to comment.