【发布时间】:2020-03-03 03:08:36
【问题描述】:
Jest 通过以下方式缩短错误日志:
GraphQLError {
message: 'Cannot set property \'marketCap\' of undefined',
locations: [ { line: 3, column: 11 } ],
path: [ 'listings' ],
extensions:
{ code: 'INTERNAL_SERVER_ERROR',
exception: { stacktrace: [Array] }
}
} 0 [
GraphQLError {
message: 'Cannot set property \'marketCap\' of undefined',
locations: [ [Object] ],
path: [ 'listings' ],
extensions: { code: 'INTERNAL_SERVER_ERROR', exception: [Object] }
}
]
如何强制它打印整个错误而不是使用[Array] 和[Object]?
【问题讨论】:
标签: javascript node.js jestjs