Skip to content

Commit 067074d

Browse files
committed
Merge pull request #577 from zetaben/patch-1
Fix non ES5 compliant regexp
2 parents a4b253d + 37e9d25 commit 067074d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/chai/utils/getMessage.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ module.exports = function (obj, args) {
4343
if(typeof msg === "function") msg = msg();
4444
msg = msg || '';
4545
msg = msg
46-
.replace(/#{this}/g, function () { return objDisplay(val); })
47-
.replace(/#{act}/g, function () { return objDisplay(actual); })
48-
.replace(/#{exp}/g, function () { return objDisplay(expected); });
46+
.replace(/#\{this\}/g, function () { return objDisplay(val); })
47+
.replace(/#\{act\}/g, function () { return objDisplay(actual); })
48+
.replace(/#\{exp\}/g, function () { return objDisplay(expected); });
4949

5050
return flagMsg ? flagMsg + ': ' + msg : msg;
5151
};

0 commit comments

Comments
 (0)