mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-13 08:06:24 +08:00
ad4e1ed7de
close CLOUD-181
24 lines
591 B
TypeScript
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);
|
|
});
|