| 6 | }; |
| 7 | |
| 8 | export class NullMailTransport implements MailTransport { |
| 9 | constructor(options: NullMailTransportOptions) {} |
| 10 | |
| 11 | async send({ to, subject, react }: MailMessage): Promise<void> { |
| 12 | const html = await render(react); |
| 13 | const text = toPlainText(html); |
| 14 | console.log(` |
| 15 | ##### sendEmail to ${to}, subject: ${subject} |
| 16 | |
| 17 | ${text} |
| 18 | `); |
| 19 | } |
| 20 | |
| 21 | async sendPlainText({ to, subject, text }: PlainTextMailMessage): Promise<void> { |
| 22 | console.log(` |
| 23 | ##### sendEmail to ${to}, subject: ${subject} |
| 24 | |
| 25 | ${text} |
| 26 | `); |
| 27 | } |
| 28 | } |
nothing calls this directly
no outgoing calls
no test coverage detected