Skip to content

Commit

Permalink
Fix check test failure for FF 3.6
Browse files Browse the repository at this point in the history
TIL sometimes JSON.stringify can convert new lines to "\u000a" as supposed to "\n".# Please enter the commit message for your changes. Lines starting
  • Loading branch information
Slava committed Aug 13, 2013
1 parent bfe4d2e commit dd416e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/check/match_test.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ Tinytest.add("check - Match error path", function (test) {
try { try {
check(value, pattern); check(value, pattern);
} catch (err) { } catch (err) {
// XXX just for FF 3.6, its JSON stringification prefers "\u000a" to "\n"
err.path = err.path.replace(/\\u000a/, "\\n");
if (err.path != expectedPath) if (err.path != expectedPath)
test.fail({ test.fail({
type: "match-error-path", type: "match-error-path",
Expand Down

0 comments on commit dd416e6

Please sign in to comment.