From f286a89a5f5aa6d0a44a83442ff1cffb90e5f190 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 27 Jul 2022 12:32:49 +0800 Subject: [PATCH] Fix tests --- packages/api/test/routers/emails.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/api/test/routers/emails.test.ts b/packages/api/test/routers/emails.test.ts index 3b39f14f4..d313a75d3 100644 --- a/packages/api/test/routers/emails.test.ts +++ b/packages/api/test/routers/emails.test.ts @@ -10,6 +10,7 @@ import { expect } from 'chai' import { request } from '../util' import * as parser from '../../src/utils/parser' import * as sendNotification from '../../src/utils/sendNotification' +import * as sendEmail from '../../src/utils/sendEmail' describe('Emails Router', () => { const username = 'fakeUser' @@ -29,6 +30,7 @@ describe('Emails Router', () => { 'sendMulticastPushNotifications', sinon.fake.resolves(undefined) ) + sinon.replace(sendEmail, 'sendEmail', sinon.fake.resolves(true)) }) after(async () => {