Files
AFFiNE-Mirror/packages/backend/server/src/__tests__/mails.spec.ts
T
2025-03-25 12:58:43 +00:00

24 lines
591 B
TypeScript

import test from 'ava';
import { Renderers } from '../mails';
import { TEST_DOC, TEST_USER } from '../mails/common';
test('should render emails', async t => {
for (const render of Object.values(Renderers)) {
// @ts-expect-error use [PreviewProps]
const content = await render();
t.snapshot(content.html, content.subject);
}
});
test('should render mention email with empty doc title', async t => {
const content = await Renderers.Mention({
user: TEST_USER,
doc: {
...TEST_DOC,
title: '',
},
});
t.snapshot(content.html, content.subject);
});