diff --git a/apps/meteor/client/views/admin/customEmoji/CustomEmoji.spec.tsx b/apps/meteor/client/views/admin/customEmoji/CustomEmoji.spec.tsx index 7016e3a4b3a3..d59a8c815150 100644 --- a/apps/meteor/client/views/admin/customEmoji/CustomEmoji.spec.tsx +++ b/apps/meteor/client/views/admin/customEmoji/CustomEmoji.spec.tsx @@ -38,7 +38,7 @@ describe('CustomEmoji Component', () => { }); }); - it("renders emoji's aliases as comma-separated values", async () => { + it("renders emoji's aliases as comma-separated values when aliases is an array", async () => { render(, { legacyRoot: true, wrapper: appRoot.build(), @@ -48,4 +48,32 @@ describe('CustomEmoji Component', () => { expect(screen.getByText('happy, joy')).toBeInTheDocument(); }); }); + + it("renders emoji's aliases values when aliases is a string", async () => { + render(, { + legacyRoot: true, + wrapper: mockAppRoot() + .withEndpoint('GET', '/v1/emoji-custom.all', () => ({ + count: 1, + offset: 0, + total: 1, + success: true, + emojis: [ + { + _id: '1', + name: 'smile', + aliases: 'happy' as any, + extension: 'webp', + _updatedAt: new Date().toISOString(), + etag: 'abcdef', + }, + ], + })) + .build(), + }); + + await waitFor(() => { + expect(screen.getByText('happy')).toBeInTheDocument(); + }); + }); });