Skip to content

Commit

Permalink
Merge 3741f05 into 1d0ce13
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzogrv committed Jan 15, 2014
2 parents 1d0ce13 + 3741f05 commit 3ea5878
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/chai/core/assertions.js
Expand Up @@ -1027,7 +1027,10 @@ module.exports = function (chai, _) {
constructor = null;
errMsg = null;
} else if (typeof constructor === 'function') {
name = (new constructor()).name;
name = constructor.prototype.name || constructor.name;
if (name === 'Error' && constructor !== Error) {
name = (new constructor()).name;
}
} else {
constructor = null;
}
Expand Down

0 comments on commit 3ea5878

Please sign in to comment.