1a4faab381
* feat: Creates cc bcc input component for reply box * Adds email inputs for cc and bcc * Cleans storybook code * Fixes eslint issues * Update app/javascript/dashboard/components/widgets/conversation/stories/ReplyEmailHead.stories.js Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> * Review fixes * Update app/javascript/dashboard/components/widgets/conversation/stories/ReplyEmailHead.stories.js Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> * Update app/javascript/dashboard/components/widgets/conversation/stories/ReplyEmailHead.stories.js Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> * Update app/javascript/dashboard/components/widgets/conversation/stories/ReplyEmailHead.stories.js Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
13 lines
513 B
JavaScript
13 lines
513 B
JavaScript
import { validEmailsByComma } from '../emailHeadHelper';
|
|
|
|
describe('#validEmailsByComma', () => {
|
|
it('returns true when empty string is passed', () => {
|
|
expect(validEmailsByComma('')).toEqual(true);
|
|
});
|
|
it('returns true when valid emails separated by comma is passed', () => {
|
|
expect(validEmailsByComma('ni@njan.com,po@va.da')).toEqual(true);
|
|
});
|
|
it('returns false when one of the email passed is invalid', () => {
|
|
expect(validEmailsByComma('ni@njan.com,pova.da')).toEqual(false);
|
|
});
|
|
});
|