The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
import { isValidAgentMessageReactionEmoji } from '../is-valid-agent-message-reaction-emoji.util';
describe('isValidAgentMessageReactionEmoji', () => {
it.each(['π', 'β€οΈ', 'π', 'ππ½', 'π¨βπ©βπ§βπ¦', 'π³οΈβπ', 'π«π·', '1οΈβ£'])(
'should accept "%s"',
(emoji) => {
expect(isValidAgentMessageReactionEmoji(emoji)).toBe(true);
},
);
it.each([
['an empty string', ''],
['plain text', 'ok'],
['a digit', '1'],
['an emoji followed by a space', 'π '],
['two emojis split by a newline', 'π\nπ'],
['over 32 characters', 'π'.repeat(17)],
])('should reject %s', (_label, emoji) => {
expect(isValidAgentMessageReactionEmoji(emoji)).toBe(false);
});
});