test: properly mock nodemailer verify in unit test (#9832)

If nodemailer was down, this unit test would fail. Verify function
should now be properly mock and not make a network call.
This commit is contained in:
Elliot DeNolf
2024-12-09 09:58:18 -05:00
committed by GitHub
parent d791db24bd
commit e746d7afd8

View File

@@ -94,6 +94,8 @@ describe('plugin', () => {
const existingTransport = nodemailer.createTransport({
name: 'existing-transport',
// eslint-disable-next-line @typescript-eslint/require-await
verify: async (): Promise<true> => true,
// eslint-disable-next-line @typescript-eslint/require-await, @typescript-eslint/no-misused-promises
send: async (mail) => {
// eslint-disable-next-line no-console