diff --git a/clients/web/src/components/elements/ContentViewer/ContentViewer.test.tsx b/clients/web/src/components/elements/ContentViewer/ContentViewer.test.tsx
index bfd65add..66d5ace3 100644
--- a/clients/web/src/components/elements/ContentViewer/ContentViewer.test.tsx
+++ b/clients/web/src/components/elements/ContentViewer/ContentViewer.test.tsx
@@ -263,6 +263,39 @@ describe("ContentViewer", () => {
expect(screen.getByRole("button", { name: "Copy" })).toBeInTheDocument();
});
+ // The `resource` block branch used to render every embedded resource in a
+ // plain code block, so a prompt message carrying JSON did not inherit this
+ // migration even though the text-block branch did.
+ it("renders an embedded JSON resource in the JSON editor", () => {
+ const block: ContentBlock = {
+ type: "resource",
+ resource: {
+ uri: "file:///a.json",
+ mimeType: "application/json",
+ text: '{"a":1}',
+ },
+ };
+ renderWithMantine(
hi
", + }, + }; + renderWithMantine(hi
")).toBeInTheDocument(); + expect(document.querySelector("iframe")).toBeNull(); + }); + it("renders nothing when neither block nor contents is provided", () => { const { container } = renderWithMantine(