Fix storybook tests (#5487)

Fixes #5486

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
gitstart-twenty
2024-05-22 02:24:08 +08:00
committed by GitHub
parent e47101e08b
commit 36b467d301
16 changed files with 709 additions and 101 deletions

View File

@ -2,16 +2,12 @@ import { formatAddressObjectAsParticipants } from 'src/modules/messaging/service
describe('formatAddressObjectAsParticipants', () => {
it('should format address object as participants', () => {
const addressObject = {
value: [
{ name: 'John Doe', address: 'john.doe @example.com' },
{ name: 'Jane Smith', address: 'jane.smith@example.com ' },
],
html: '',
text: '',
};
const addresses = [
{ name: 'John Doe', address: 'john.doe @example.com' },
{ name: 'Jane Smith', address: 'jane.smith@example.com ' },
];
const result = formatAddressObjectAsParticipants(addressObject, 'from');
const result = formatAddressObjectAsParticipants(addresses, 'from');
expect(result).toEqual([
{