mirror of
https://github.com/chaijs/chai
synced 2024-11-15 00:07:11 +00:00
simplify error inspections for cross browser compatibility
This commit is contained in:
parent
d02e94adff
commit
a05cba500c
2 changed files with 4 additions and 3 deletions
3
chai.js
3
chai.js
|
@ -2992,7 +2992,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|||
|
||||
// Make error with message first say the error
|
||||
if (isError(value)) {
|
||||
base = ' ' + formatError(value);
|
||||
return formatError(value);
|
||||
}
|
||||
|
||||
if (keys.length === 0 && (!array || value.length == 0)) {
|
||||
|
@ -3173,6 +3173,7 @@ function isError(e) {
|
|||
function objectToString(o) {
|
||||
return Object.prototype.toString.call(o);
|
||||
}
|
||||
|
||||
}); // module: utils/inspect.js
|
||||
|
||||
require.register("utils/overwriteMethod.js", function(module, exports, require){
|
||||
|
|
|
@ -95,7 +95,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|||
|
||||
// Make error with message first say the error
|
||||
if (isError(value)) {
|
||||
base = ' ' + formatError(value);
|
||||
return formatError(value);
|
||||
}
|
||||
|
||||
if (keys.length === 0 && (!array || value.length == 0)) {
|
||||
|
@ -275,4 +275,4 @@ function isError(e) {
|
|||
|
||||
function objectToString(o) {
|
||||
return Object.prototype.toString.call(o);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue