Skip to content

Commit e027815

Browse files
committed
test: add snapshot and test case for URL escaping with backslashes (#1621)
1 parent 65245c9 commit e027815

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

test/runtime/__snapshots__/getUrl.test.js.snap

+2
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,5 @@ exports[`escape should escape url 41`] = `""image other.png#hash""`;
8585
exports[`escape should escape url 42`] = `""image other.png#hash""`;
8686

8787
exports[`escape should escape url 43`] = `""image other.png#hash""`;
88+
89+
exports[`escape should escape url 44`] = `"http://url/path\\/"`;

test/runtime/getUrl.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -127,5 +127,6 @@ describe("escape", () => {
127127
{ hash: "#hash", needQuotes: true },
128128
),
129129
).toMatchSnapshot();
130+
expect(getUrl("http://url/path\\/")).toMatchSnapshot();
130131
});
131132
});

0 commit comments

Comments
 (0)