Skip to content

Commit

Permalink
Check for toString method
Browse files Browse the repository at this point in the history
  • Loading branch information
jkimbo committed Feb 17, 2016
1 parent 17eeba0 commit 3e2194b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reporters/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ exports.list = function(failures) {
var msg;
var err = test.err;
var message;
if (err.message && typeof err.message === 'string') {
if (err.message && typeof err.message.toString === 'function') {
message = err.message;
} else if (typeof err.inspect === 'function') {
message = err.inspect() + '';
Expand Down

0 comments on commit 3e2194b

Please sign in to comment.