diff --git a/packages/jsx-email/test/.snapshots/conditional-raw-minimal.test.tsx.snap b/packages/jsx-email/test/.snapshots/conditional-raw-minimal.test.tsx.snap new file mode 100644 index 00000000..33503461 --- /dev/null +++ b/packages/jsx-email/test/.snapshots/conditional-raw-minimal.test.tsx.snap @@ -0,0 +1,5 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`snapshot: minimal inside > renders a minimal MSO block with inlined Raw content (jsxToString) 1`] = `""`; + +exports[`snapshot: minimal inside > renders final HTML via the render pipeline 1`] = `""`; diff --git a/packages/jsx-email/test/conditional-raw-minimal.test.tsx b/packages/jsx-email/test/conditional-raw-minimal.test.tsx new file mode 100644 index 00000000..7ce5e5cf --- /dev/null +++ b/packages/jsx-email/test/conditional-raw-minimal.test.tsx @@ -0,0 +1,29 @@ +import { jsxToString } from '../src/renderer/jsx-to-string.js'; +import { render } from '../src/renderer/render.js'; +import { Conditional } from '../src/components/conditional.js'; +import { Raw } from '../src/components/raw.js'; + +const minimalFragment = ( + + hello'} /> + +); + +/** + * Minimal snapshot fixture for `` nested inside ``. + * + * This test intentionally asserts a snapshot of whatever the current + * render pipeline produces for this structure so we can iterate on it + * in follow‑ups. There are no behavioral assertions beyond the snapshot. + */ +describe('snapshot: minimal inside ', () => { + it('renders a minimal MSO block with inlined Raw content (jsxToString)', async () => { + const html = await jsxToString(minimalFragment); + expect(html).toMatchSnapshot(); + }); + + it('renders final HTML via the render pipeline', async () => { + const html = await render(minimalFragment); + expect(html).toMatchSnapshot(); + }); +});