Skip to content

Commit c1cec44

Browse files
committed
Workaround for Sinon bug that repeatedly quotes things
I discovered this bug while working on this, there's a PR for fix here for reference: sinonjs/sinon#2407
1 parent de3e205 commit c1cec44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/messages.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ function makeErrorMessageTransform(transform) {
1818
};
1919
}
2020
var stripQuotes = makeErrorMessageTransform(function (message) {
21-
return message.replace(/['"]/g, "");
21+
return message.replace(/\\*['"]/g, "");
2222
});
2323
var stripColors = makeErrorMessageTransform(stripAnsi);
2424
var stripQuotesAndColors = makeErrorMessageTransform(function (message) {
25-
return stripAnsi(message).replace(/['"]/g, "");
25+
return stripAnsi(message).replace(/\\*['"]/g, "");
2626
});
2727

2828
describe("Messages", function () {

0 commit comments

Comments
 (0)