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 28, 2017
1 parent a412c96 commit b938f3b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"node": ">=0.10"
},
"dependencies": {
"assertion-error-formatter": "^2.0.0",
"assertion-error-formatter": "^2.0.1",
"babel-runtime": "^6.11.6",
"bluebird": "^3.4.1",
"cli-table": "^0.3.1",
Expand Down
3 changes: 2 additions & 1 deletion src/formatter/json_formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Formatter from './'
import Status from '../status'
import { formatLocation, GherkinDocumentParser, PickleParser } from './helpers'
import { buildStepArgumentIterator } from '../step_arguments'
import { format } from 'assertion-error-formatter'

const {
getStepLineToKeywordMap,
Expand Down Expand Up @@ -156,7 +157,7 @@ export default class JsonFormatter extends Formatter {
data.result.duration = testStep.result.duration
}
if (status === Status.FAILED && exception) {
data.result.error_message = exception.stack || exception
data.result.error_message = format(exception)
}
}
if (_.size(testStep.attachments) > 0) {
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ assert@^1.4.0:
dependencies:
util "0.10.3"

assertion-error-formatter@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/assertion-error-formatter/-/assertion-error-formatter-2.0.0.tgz#17a24289cc8440889b54318e6d1187ebee2d5494"
assertion-error-formatter@^2.0.1:
version "2.0.1"
resolved "http://artifactory.yoox.net/artifactory/api/npm/ynap-virtual-npm/assertion-error-formatter/-/assertion-error-formatter-2.0.1.tgz#6bbdffaec8e2fa9e2b0eb158bfe353132d7c0a9b"
dependencies:
diff "^3.0.0"
pad-right "^0.2.2"
Expand Down

0 comments on commit b938f3b

Please sign in to comment.