Skip to content

Commit eca53d3

Browse files
committed
fix: address review feedback across client and contracts
1 parent a6a1991 commit eca53d3

21 files changed

+2405
-805
lines changed

client/__tests__/MetadataParser.test.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ describe("parseMetadata", () => {
7979
);
8080
expect(screen.getByTestId("image")).toHaveAttribute(
8181
"src",
82-
"https://example.com/image.png",
82+
expect.stringContaining(
83+
encodeURIComponent("https://example.com/image.png"),
84+
),
8385
);
8486
expect(screen.getByTestId("link")).toHaveAttribute(
8587
"href",
@@ -99,7 +101,9 @@ describe("parseMetadata", () => {
99101
expect(screen.getByTestId("description")).toHaveTextContent(metadata); // fallback to raw string
100102
expect(screen.getByTestId("image")).toHaveAttribute(
101103
"src",
102-
"https://example.com/image.png",
104+
expect.stringContaining(
105+
encodeURIComponent("https://example.com/image.png"),
106+
),
103107
);
104108
expect(screen.getByTestId("link")).toHaveAttribute("href", "");
105109
});
@@ -155,7 +159,9 @@ describe("parseMetadata", () => {
155159
);
156160
expect(screen.getByTestId("image")).toHaveAttribute(
157161
"src",
158-
"https://example.com/complete.png",
162+
expect.stringContaining(
163+
encodeURIComponent("https://example.com/complete.png"),
164+
),
159165
);
160166
expect(screen.getByTestId("link")).toHaveAttribute(
161167
"href",

0 commit comments

Comments
 (0)