From a9085c65c59ebe2823a6081fd0c5d2267feb4644 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 27 Jun 2025 15:03:10 -0700 Subject: [PATCH] Chore: fix some test warnings / errors --- src-ui/src/app/components/manage/mail/mail.component.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src-ui/src/app/components/manage/mail/mail.component.spec.ts b/src-ui/src/app/components/manage/mail/mail.component.spec.ts index 4968f9d37..d1878d6d3 100644 --- a/src-ui/src/app/components/manage/mail/mail.component.spec.ts +++ b/src-ui/src/app/components/manage/mail/mail.component.spec.ts @@ -158,13 +158,14 @@ describe('MailComponent', () => { it('should show errors on load if load mailAccounts failure', () => { const toastErrorSpy = jest.spyOn(toastService, 'showError') + jest.spyOn(mailAccountService, 'getCached').mockReturnValue(of(null)) jest .spyOn(mailAccountService, 'listAll') .mockImplementation(() => throwError(() => new Error('failed to load mail accounts')) ) completeSetup(mailAccountService) - expect(toastErrorSpy).toBeCalled() + expect(toastErrorSpy).toHaveBeenCalled() }) it('should show errors on load if load mailRules failure', () => { @@ -175,7 +176,7 @@ describe('MailComponent', () => { throwError(() => new Error('failed to load mail rules')) ) completeSetup(mailRuleService) - expect(toastErrorSpy).toBeCalled() + expect(toastErrorSpy).toHaveBeenCalled() }) it('should support edit / create mail account, show error if needed', () => {