jest-message-util
Advanced tools
Comparing version 23.0.0-charlie.1 to 23.0.0-charlie.2
@@ -116,8 +116,8 @@ 'use strict'; | ||
const formatExecError = (exports.formatExecError = ( | ||
testResult, | ||
error, | ||
config, | ||
options, | ||
testPath | ||
testPath, | ||
reuseMessage | ||
) => { | ||
let error = testResult.testExecError; | ||
if (!error || typeof error === 'number') { | ||
@@ -128,5 +128,3 @@ error = new Error(`Expected an Error, but "${String(error)}" was thrown`); | ||
var _error = error; | ||
let message = _error.message, | ||
stack = _error.stack; | ||
let message, stack; | ||
@@ -137,2 +135,5 @@ if (typeof error === 'string' || !error) { | ||
stack = error; | ||
} else { | ||
message = error.message; | ||
stack = error.stack; | ||
} | ||
@@ -162,11 +163,11 @@ | ||
return ( | ||
TITLE_INDENT + | ||
TITLE_BULLET + | ||
EXEC_ERROR_MESSAGE + | ||
'\n\n' + | ||
message + | ||
stack + | ||
'\n' | ||
); | ||
let messageToUse; | ||
if (reuseMessage) { | ||
messageToUse = ` ${message.trim()}`; | ||
} else { | ||
messageToUse = `${EXEC_ERROR_MESSAGE}\n\n${message}`; | ||
} | ||
return TITLE_INDENT + TITLE_BULLET + messageToUse + stack + '\n'; | ||
}); | ||
@@ -173,0 +174,0 @@ |
{ | ||
"name": "jest-message-util", | ||
"version": "23.0.0-charlie.1", | ||
"version": "23.0.0-charlie.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10505
300