From 592cf1f9d8b979ec8d96ffebce73c8bf0ae7ca67 Mon Sep 17 00:00:00 2001 From: Artem Savchenko Date: Tue, 3 Jun 2025 11:41:45 +0700 Subject: [PATCH] UBERF-11411: Update test Signed-off-by: Artem Savchenko --- services/mail/mail-common/src/__tests__/channel.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/mail/mail-common/src/__tests__/channel.test.ts b/services/mail/mail-common/src/__tests__/channel.test.ts index b35d202200..b5007995dd 100644 --- a/services/mail/mail-common/src/__tests__/channel.test.ts +++ b/services/mail/mail-common/src/__tests__/channel.test.ts @@ -141,9 +141,10 @@ describe('ChannelCache', () => { const error = new Error('Database error') mockClient.findOne.mockRejectedValue(error) - const result = await channelCache.getOrCreateChannel(spaceId, participants, emailAccount, personId) + await expect(channelCache.getOrCreateChannel(spaceId, participants, emailAccount, personId)) + .rejects + .toThrow('Failed to create channel for test@example.com in space test-space-id: Database error') - expect(result).toBeUndefined() expect(mockCtx.error).toHaveBeenCalledWith('Failed to create channel', { me: emailAccount, space: spaceId,