Skip to content

Commit

Permalink
Fixing the reporting of [object Object] (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieltseitlin authored Apr 13, 2021
1 parent 0795475 commit ab9d0e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ exports['default'] = () => {
if(isJSON && JSON.parse(message).errMsg !== undefined) message = JSON.parse(message).errMsg;
//If the log is a JS Object
else if(isJSON) message = JSON.parse(message)
else if(typeof message === 'object') message = `${message}`
message = this.reporter.client.isJSON(message) ? JSON.stringify(message): message
}
await this.reporter.sendTestLogs(testId, level, message, time, attachment);
Expand Down

0 comments on commit ab9d0e0

Please sign in to comment.