From 5a91a529b1c2e7017a41822427d315d100ae6cfd Mon Sep 17 00:00:00 2001 From: Aster Fialla Date: Tue, 24 Feb 2026 15:47:30 -0500 Subject: [PATCH] removing then/catch from messageHelper.test.js --- tests/helpers/messageHelper.test.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tests/helpers/messageHelper.test.js b/tests/helpers/messageHelper.test.js index 7163e21..c8c1956 100644 --- a/tests/helpers/messageHelper.test.js +++ b/tests/helpers/messageHelper.test.js @@ -3,9 +3,11 @@ env.config(); jest.mock('../../src/helpers/memberHelper.js', () => { - return {memberHelper: { - getMembersByAuthor: jest.fn() - }} + return { + memberHelper: { + getMembersByAuthor: jest.fn() + } + } }) const {memberHelper} = require("../../src/helpers/memberHelper.js"); @@ -72,17 +74,16 @@ describe('messageHelper', () => { ['2', 'hello', null, undefined], ['2', '--hello', null, undefined], ['2', 'hello', attachmentUrl, undefined], - ['2', '--hello', attachmentUrl,undefined], + ['2', '--hello', attachmentUrl, undefined], ['3', 'hello', null, {}], ['3', '--hello', null, {}], ['3', 'hello', attachmentUrl, {}], - ['3', '--hello', attachmentUrl,{}], - ])('ID %s with string %s returns correct proxy', async(specificAuthorId, content, attachmentUrl, expected) => { + ['3', '--hello', attachmentUrl, {}], + ])('ID %s with string %s returns correct proxy', async (specificAuthorId, content, attachmentUrl, expected) => { // Act - return messageHelper.parseProxyTags(specificAuthorId, content, attachmentUrl).then((res) => { - // Assert - expect(res).toEqual(expected); - }) + const res = await messageHelper.parseProxyTags(specificAuthorId, content, attachmentUrl); + // Assert + expect(res).toEqual(expected); }); })