diff --git a/lib/shared/emojis.test.js b/lib/shared/emojis.test.js new file mode 100644 index 000000000..169800420 --- /dev/null +++ b/lib/shared/emojis.test.js @@ -0,0 +1,25 @@ +// @flow + +import { onlyOneEmojiRegex } from './emojis'; + +describe('onlyOneEmojiRegex', () => { + it('should match for (πŸ‘)', () => { + expect('πŸ‘').toMatch(onlyOneEmojiRegex); + }); + + it('should match for (🫑)', () => { + expect('🫑').toMatch(onlyOneEmojiRegex); + }); + + it('should match for (🦢🏾)', () => { + expect('🦢🏾').toMatch(onlyOneEmojiRegex); + }); + + it('should not match for (πŸ¦ΆπŸΎπŸ™)', () => { + expect('πŸ¦ΆπŸΎπŸ™').not.toMatch(onlyOneEmojiRegex); + }); + + it('should not match for (that is πŸ”₯)', () => { + expect('that is πŸ”₯').not.toMatch(onlyOneEmojiRegex); + }); +});