diff --git a/apps/app/src/components/ui/markdown-message-directives.test.tsx b/apps/app/src/components/ui/markdown-message-directives.test.tsx index 545edd6a5..96d80542d 100644 --- a/apps/app/src/components/ui/markdown-message-directives.test.tsx +++ b/apps/app/src/components/ui/markdown-message-directives.test.tsx @@ -239,6 +239,27 @@ describe("MarkdownPreview message directives", () => { expect(screen.queryByTestId("inline-vis")).toBeNull(); }); + it("mounts a recognized text directive inside prose", () => { + const registry = buildMessageDirectiveRegistry([ + slot({ id: "source-file", pluginId: "demo", component: InlineVis }), + ]); + render( + , + ); + + expect(screen.getByTestId("inline-vis").getAttribute("data-file")).toBe( + "/tmp/data.xlsx", + ); + expect(screen.queryByText(/:source-file/)).toBeNull(); + }); + it("keeps clock times intact and leaves the prose as a single text node", () => { const registry = buildMessageDirectiveRegistry([ slot({ id: "inline-vis", pluginId: "demo", component: InlineVis }),