diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-11-14 15:59:23 -0600 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-11-15 01:54:52 -0600 |
commit | 9e5db3e26169dd25ae852e4197ef02ba0a3ef84a (patch) | |
tree | c69dce3a5e9fa97bfc9799f3bbfaa17f68877d64 /spec/javascripts/emoji_spec.js | |
parent | b5b35865435ee12be26c22d37b286a4936b701af (diff) | |
download | gitlab-ce-9e5db3e26169dd25ae852e4197ef02ba0a3ef84a.tar.gz |
Add rainbow_flag to emoji support map
Tested on the following platforms that split the emoji into separate
characters currently.
- Windows 10 FCU
- Chrome 62.0.3202.89
- Firefox 57.0b14
- MS Edge 41.16299.15.0
- macOS 10.12.6
- Chrome 63.0.3239.40
- Safari 11.0.1 (12604.3.5.1.1)
- Firefox 57.0
- Ubuntu 16.04
- Chromium 62.0.3202.75
- Firefox 56.0
Diffstat (limited to 'spec/javascripts/emoji_spec.js')
-rw-r--r-- | spec/javascripts/emoji_spec.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/javascripts/emoji_spec.js b/spec/javascripts/emoji_spec.js index fa11c602ec3..124d91f4477 100644 --- a/spec/javascripts/emoji_spec.js +++ b/spec/javascripts/emoji_spec.js @@ -1,6 +1,7 @@ import { glEmojiTag } from '~/emoji'; import isEmojiUnicodeSupported, { isFlagEmoji, + isRainbowFlagEmoji, isKeycapEmoji, isSkinToneComboEmoji, isHorceRacingSkinToneComboEmoji, @@ -217,6 +218,24 @@ describe('gl_emoji', () => { }); }); + describe('isRainbowFlagEmoji', () => { + it('should gracefully handle empty string', () => { + expect(isRainbowFlagEmoji('')).toBeFalsy(); + }); + it('should detect rainbow_flag', () => { + expect(isRainbowFlagEmoji('🏳🌈')).toBeTruthy(); + }); + it('should not detect flag_white on its\' own', () => { + expect(isRainbowFlagEmoji('🏳')).toBeFalsy(); + }); + it('should not detect rainbow on its\' own', () => { + expect(isRainbowFlagEmoji('🌈')).toBeFalsy(); + }); + it('should not detect flag_white with something else', () => { + expect(isRainbowFlagEmoji('🏳🔵')).toBeFalsy(); + }); + }); + describe('isKeycapEmoji', () => { it('should gracefully handle empty string', () => { expect(isKeycapEmoji('')).toBeFalsy(); |