fix(andreknie.de): harden personal data lifecycle

This commit is contained in:
2026-07-28 11:13:27 +02:00
parent 772a63c622
commit b31da6175a
11 changed files with 276 additions and 124 deletions
@@ -0,0 +1,12 @@
import { describe, expect, it } from 'vitest'
import { isMailerReady, MailerNotReadyError, sendConfirmationEmail } from './mailer.js'
describe('mailer readiness', () => {
it('reports missing SMTP configuration without exposing credentials', async () => {
expect(isMailerReady()).toBe(false)
await expect(sendConfirmationEmail('test@example.invalid', 'contact', 'synthetic-token'))
.rejects.toBeInstanceOf(MailerNotReadyError)
await expect(sendConfirmationEmail('test@example.invalid', 'contact', 'synthetic-token'))
.rejects.toMatchObject({ code: 'MAILER_NOT_READY' })
})
})