We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b32f54 commit 5f415dfCopy full SHA for 5f415df
lib/assert/error.js
@@ -7,8 +7,10 @@ require('assert').AssertionError.prototype.toString = function () {
7
8
function parse(str) {
9
return str.replace(/{actual}/g, inspect(that.actual)).
10
- replace(/{expected}/g, inspect(that.expected)).
11
- replace(/{operator}/g, stylize(that.operator, 'bold'));
+ replace(/{operator}/g, stylize(that.operator, 'bold')).
+ replace(/{expected}/g, (that.expected instanceof Function)
12
+ ? that.expected.name
13
+ : inspect(that.expected));
14
}
15
16
if (this.message) {
0 commit comments