Ocelot-Social/backend/src/emails/sendEmailVerification.spec.ts

41 lines
843 B
TypeScript

import CONFIG from '@config/index'
CONFIG.SUPPORT_EMAIL = 'devops@ocelot.social'
// eslint-disable-next-line import-x/first
import { sendEmailVerification } from './sendEmail'
describe('sendEmailVerification', () => {
const data: {
email: string
nonce: string
locale: string
name: string
} = {
email: 'user@example.org',
nonce: '123456',
locale: 'en',
name: 'User',
}
describe('English', () => {
beforeEach(() => {
data.locale = 'en'
})
it('renders correctly', async () => {
await expect(sendEmailVerification(data)).resolves.toMatchSnapshot()
})
})
describe('German', () => {
beforeEach(() => {
data.locale = 'de'
})
it('renders correctly', async () => {
await expect(sendEmailVerification(data)).resolves.toMatchSnapshot()
})
})
})