feat(email-renderer): add marketing and commerce blocks
This commit is contained in:
1 parent
edccf06658
commit
6cdd39ba38
3 files changed
+122
-1
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import {
|
||||
emailCoreBlocks,
|
||||
renderEmail,
|
||||
validateAmpEmail,
|
||||
validateMjml,
|
||||
@@ -91,4 +92,23 @@ describe("email renderer", () => {
|
||||
(await validateMjml("<mjml><mj-body><mj-text>x</mj-text></mj-body></mjml>")).length,
|
||||
).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
test("ships the complete marketing block pack", () => {
|
||||
expect(emailCoreBlocks.map((block) => block.manifest.type)).toEqual(
|
||||
expect.arrayContaining([
|
||||
"content.video",
|
||||
"content.social",
|
||||
"content.countdown",
|
||||
"content.survey",
|
||||
"content.feed-item",
|
||||
"commerce.product",
|
||||
]),
|
||||
);
|
||||
for (const block of emailCoreBlocks) {
|
||||
expect(block.textRenderer).toBeFunction();
|
||||
expect(block.renderers?.emailHtml).toBeFunction();
|
||||
expect(block.renderers?.ampEmail).toBeFunction();
|
||||
expect(block.renderers?.mjml).toBeFunction();
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user