Skip to content

Commit

Permalink
Merge pull request #577 from zetaben/patch-1
Browse files Browse the repository at this point in the history
Fix non ES5 compliant regexp
  • Loading branch information
keithamus committed Dec 23, 2015
2 parents a4b253d + 37e9d25 commit 067074d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/chai/utils/getMessage.js
Expand Up @@ -43,9 +43,9 @@ module.exports = function (obj, args) {
if(typeof msg === "function") msg = msg();
msg = msg || '';
msg = msg
.replace(/#{this}/g, function () { return objDisplay(val); })
.replace(/#{act}/g, function () { return objDisplay(actual); })
.replace(/#{exp}/g, function () { return objDisplay(expected); });
.replace(/#\{this\}/g, function () { return objDisplay(val); })
.replace(/#\{act\}/g, function () { return objDisplay(actual); })
.replace(/#\{exp\}/g, function () { return objDisplay(expected); });

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

0 comments on commit 067074d

Please sign in to comment.