Chore: fix some test warnings / errors

This commit is contained in:
shamoon 2025-06-27 15:03:10 -07:00
parent e312425b1c
commit a9085c65c5
No known key found for this signature in database

View File

@ -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', () => {