Constrain email table sizing around intrinsic image widths
Quality / quality (ubuntu-latest) (push) Failing after 1s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
Clintchiz committed 2026-09-05 18:05:16 +05:30
1 parent b0fca36bca
commit 3da88510df
3 files changed
+4 -2

No files matched your search

@@ -17,6 +17,8 @@ test("meaningful image alt and explicit dimensions survive MJML round trip", asy
const rendered = await renderEmail(documentFor(false), { mjml: true });
if (!rendered.ok) throw new Error("Render failed");
expect(rendered.value.parts.text.content).toContain("Accessible & descriptive");
expect(rendered.value.parts.html.content.match(/table-layout:fixed/g)).toHaveLength(2);
expect(rendered.value.parts.html.content).toContain("max-width:100%;width:600px");
expect(rendered.value.exports!.mjml).toContain('width="320px" height="180px"');
let id = 0;
const imported = importMjml(rendered.value.exports!.mjml!, { id: () => `n${++id}` });