unexpected
Advanced tools
Comparing version 5.1.4 to 5.1.5
@@ -244,3 +244,3 @@ /*global setTimeout*/ | ||
} else { | ||
var message = arg || "explicit failure"; | ||
var message = arg ? String(arg) : 'explicit failure'; | ||
var args = Array.prototype.slice.call(arguments, 1); | ||
@@ -247,0 +247,0 @@ var tokens = message.split(placeholderSplitRegexp); |
@@ -64,3 +64,3 @@ var stringDiff = require('diff'); | ||
isError: function (err) { | ||
return typeof err === 'object' && Object.prototype.toString.call(err) === '[object Error]'; | ||
return typeof err === 'object' && (Object.prototype.toString.call(err) === '[object Error]' || err instanceof Error); | ||
}, | ||
@@ -86,3 +86,3 @@ | ||
}); | ||
// The 'message' property of Error instances is enumerable for some reason, but we want | ||
// The 'message' property of Error instances is not enumerable for some reason, but we want | ||
// to include it in the set when comparing: | ||
@@ -89,0 +89,0 @@ if (Object.prototype.toString.call(object) === '[object Error]') { |
{ | ||
"name": "unexpected", | ||
"version": "5.1.4", | ||
"version": "5.1.5", | ||
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3397922
56
11719