Skip to content

Commit

Permalink
test: update URL snapshot and test case for escaping backslashes (#1621)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchira-net committed Dec 2, 2024
1 parent e027815 commit 28ca565
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/runtime/__snapshots__/getUrl.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ exports[`escape should escape url 42`] = `""image other.png#hash""`;

exports[`escape should escape url 43`] = `""image other.png#hash""`;

exports[`escape should escape url 44`] = `"http://url/path\\/"`;
exports[`escape should escape url 44`] = `"https://www.example.com?path=path\\to\\resource"`;
4 changes: 3 additions & 1 deletion test/runtime/getUrl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ describe("escape", () => {
{ hash: "#hash", needQuotes: true },
),
).toMatchSnapshot();
expect(getUrl("http://url/path\\/")).toMatchSnapshot();
expect(
getUrl("https://www.example.com?path=path\\to\\resource"),
).toMatchSnapshot();
});
});

0 comments on commit 28ca565

Please sign in to comment.