Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

test(shared): expect the default image width inside a fold

tianma-if1e5191443bd5
diff --git a/packages/shared/src/content.test.mjs b/packages/shared/src/content.test.mjs
index 1c9636ce..eb377392 100644
--- a/packages/shared/src/content.test.mjs
+++ b/packages/shared/src/content.test.mjs
@@ -495,9 +495,9 @@ hello **world**
expect(doc.content[0]?.type).toBe("details");
expect(doc.content[0]?.content?.[1]?.content?.[0]).toMatchObject({
type: "image",
- attrs: { src: "https://example.com/a.png", alt: "pic" },
+ attrs: { src: "https://example.com/a.png", alt: "pic", width: 35 },
});
- expect(docToMarkdown(doc)).toContain('<img src="https://example.com/a.png" alt="pic" />');
+ expect(docToMarkdown(doc)).toContain('<img src="https://example.com/a.png" alt="pic" width="35%" />');
});
test("plays a remote video inside details through the existing attachment", () => {