Removed duplicate message from errors (incl. matcher failures) on V8
This commit is contained in:
@@ -38,7 +38,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
|
||||
return message;
|
||||
};
|
||||
|
||||
this.stack = function(error) {
|
||||
this.stack = function(error, { omitMessage } = {}) {
|
||||
if (!error || !error.stack) {
|
||||
return null;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) {
|
||||
var lines = filterJasmine(stackTrace);
|
||||
var result = '';
|
||||
|
||||
if (stackTrace.message) {
|
||||
if (stackTrace.message && !omitMessage) {
|
||||
lines.unshift(stackTrace.message);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,9 @@ getJasmineRequireObj().buildExpectationResult = function(j$) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return stackFormatter(error);
|
||||
// Omit the message from the stack trace because it will be
|
||||
// included elsewhere.
|
||||
return stackFormatter(error, { omitMessage: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user