diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/frontend/emoji/index_spec.js | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/frontend/emoji/index_spec.js')
-rw-r--r-- | spec/frontend/emoji/index_spec.js | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/spec/frontend/emoji/index_spec.js b/spec/frontend/emoji/index_spec.js index dc8f50e0e4b..36c3eeb5a52 100644 --- a/spec/frontend/emoji/index_spec.js +++ b/spec/frontend/emoji/index_spec.js @@ -120,177 +120,177 @@ describe('emoji', () => { describe('isFlagEmoji', () => { it('should gracefully handle empty string', () => { - expect(isFlagEmoji('')).toBeFalsy(); + expect(isFlagEmoji('')).toBe(false); }); it('should detect flag_ac', () => { - expect(isFlagEmoji('π¦π¨')).toBeTruthy(); + expect(isFlagEmoji('π¦π¨')).toBe(true); }); it('should detect flag_us', () => { - expect(isFlagEmoji('πΊπΈ')).toBeTruthy(); + expect(isFlagEmoji('πΊπΈ')).toBe(true); }); it('should detect flag_zw', () => { - expect(isFlagEmoji('πΏπΌ')).toBeTruthy(); + expect(isFlagEmoji('πΏπΌ')).toBe(true); }); it('should not detect flags', () => { - expect(isFlagEmoji('π')).toBeFalsy(); + expect(isFlagEmoji('π')).toBe(false); }); it('should not detect triangular_flag_on_post', () => { - expect(isFlagEmoji('π©')).toBeFalsy(); + expect(isFlagEmoji('π©')).toBe(false); }); it('should not detect single letter', () => { - expect(isFlagEmoji('π¦')).toBeFalsy(); + expect(isFlagEmoji('π¦')).toBe(false); }); it('should not detect >2 letters', () => { - expect(isFlagEmoji('π¦π§π¨')).toBeFalsy(); + expect(isFlagEmoji('π¦π§π¨')).toBe(false); }); }); describe('isRainbowFlagEmoji', () => { it('should gracefully handle empty string', () => { - expect(isRainbowFlagEmoji('')).toBeFalsy(); + expect(isRainbowFlagEmoji('')).toBe(false); }); it('should detect rainbow_flag', () => { - expect(isRainbowFlagEmoji('π³π')).toBeTruthy(); + expect(isRainbowFlagEmoji('π³π')).toBe(true); }); it("should not detect flag_white on its' own", () => { - expect(isRainbowFlagEmoji('π³')).toBeFalsy(); + expect(isRainbowFlagEmoji('π³')).toBe(false); }); it("should not detect rainbow on its' own", () => { - expect(isRainbowFlagEmoji('π')).toBeFalsy(); + expect(isRainbowFlagEmoji('π')).toBe(false); }); it('should not detect flag_white with something else', () => { - expect(isRainbowFlagEmoji('π³π΅')).toBeFalsy(); + expect(isRainbowFlagEmoji('π³π΅')).toBe(false); }); }); describe('isKeycapEmoji', () => { it('should gracefully handle empty string', () => { - expect(isKeycapEmoji('')).toBeFalsy(); + expect(isKeycapEmoji('')).toBe(false); }); it('should detect one(keycap)', () => { - expect(isKeycapEmoji('1οΈβ£')).toBeTruthy(); + expect(isKeycapEmoji('1οΈβ£')).toBe(true); }); it('should detect nine(keycap)', () => { - expect(isKeycapEmoji('9οΈβ£')).toBeTruthy(); + expect(isKeycapEmoji('9οΈβ£')).toBe(true); }); it('should not detect ten(keycap)', () => { - expect(isKeycapEmoji('π')).toBeFalsy(); + expect(isKeycapEmoji('π')).toBe(false); }); it('should not detect hash(keycap)', () => { - expect(isKeycapEmoji('#β£')).toBeFalsy(); + expect(isKeycapEmoji('#β£')).toBe(false); }); }); describe('isSkinToneComboEmoji', () => { it('should gracefully handle empty string', () => { - expect(isSkinToneComboEmoji('')).toBeFalsy(); + expect(isSkinToneComboEmoji('')).toBe(false); }); it('should detect hand_splayed_tone5', () => { - expect(isSkinToneComboEmoji('ππΏ')).toBeTruthy(); + expect(isSkinToneComboEmoji('ππΏ')).toBe(true); }); it('should not detect hand_splayed', () => { - expect(isSkinToneComboEmoji('π')).toBeFalsy(); + expect(isSkinToneComboEmoji('π')).toBe(false); }); it('should detect lifter_tone1', () => { - expect(isSkinToneComboEmoji('ππ»')).toBeTruthy(); + expect(isSkinToneComboEmoji('ππ»')).toBe(true); }); it('should not detect lifter', () => { - expect(isSkinToneComboEmoji('π')).toBeFalsy(); + expect(isSkinToneComboEmoji('π')).toBe(false); }); it('should detect rowboat_tone4', () => { - expect(isSkinToneComboEmoji('π£πΎ')).toBeTruthy(); + expect(isSkinToneComboEmoji('π£πΎ')).toBe(true); }); it('should not detect rowboat', () => { - expect(isSkinToneComboEmoji('π£')).toBeFalsy(); + expect(isSkinToneComboEmoji('π£')).toBe(false); }); it('should not detect individual tone emoji', () => { - expect(isSkinToneComboEmoji('π»')).toBeFalsy(); + expect(isSkinToneComboEmoji('π»')).toBe(false); }); }); describe('isHorceRacingSkinToneComboEmoji', () => { it('should gracefully handle empty string', () => { - expect(isHorceRacingSkinToneComboEmoji('')).toBeFalsy(); + expect(isHorceRacingSkinToneComboEmoji('')).toBeUndefined(); }); it('should detect horse_racing_tone2', () => { - expect(isHorceRacingSkinToneComboEmoji('ππΌ')).toBeTruthy(); + expect(isHorceRacingSkinToneComboEmoji('ππΌ')).toBe(true); }); it('should not detect horse_racing', () => { - expect(isHorceRacingSkinToneComboEmoji('π')).toBeFalsy(); + expect(isHorceRacingSkinToneComboEmoji('π')).toBe(false); }); }); describe('isPersonZwjEmoji', () => { it('should gracefully handle empty string', () => { - expect(isPersonZwjEmoji('')).toBeFalsy(); + expect(isPersonZwjEmoji('')).toBe(false); }); it('should detect couple_mm', () => { - expect(isPersonZwjEmoji('π¨ββ€οΈβπ¨')).toBeTruthy(); + expect(isPersonZwjEmoji('π¨ββ€οΈβπ¨')).toBe(true); }); it('should not detect couple_with_heart', () => { - expect(isPersonZwjEmoji('π')).toBeFalsy(); + expect(isPersonZwjEmoji('π')).toBe(false); }); it('should not detect couplekiss', () => { - expect(isPersonZwjEmoji('π')).toBeFalsy(); + expect(isPersonZwjEmoji('π')).toBe(false); }); it('should detect family_mmb', () => { - expect(isPersonZwjEmoji('π¨βπ¨βπ¦')).toBeTruthy(); + expect(isPersonZwjEmoji('π¨βπ¨βπ¦')).toBe(true); }); it('should detect family_mwgb', () => { - expect(isPersonZwjEmoji('π¨βπ©βπ§βπ¦')).toBeTruthy(); + expect(isPersonZwjEmoji('π¨βπ©βπ§βπ¦')).toBe(true); }); it('should not detect family', () => { - expect(isPersonZwjEmoji('πͺ')).toBeFalsy(); + expect(isPersonZwjEmoji('πͺ')).toBe(false); }); it('should detect kiss_ww', () => { - expect(isPersonZwjEmoji('π©ββ€οΈβπβπ©')).toBeTruthy(); + expect(isPersonZwjEmoji('π©ββ€οΈβπβπ©')).toBe(true); }); it('should not detect girl', () => { - expect(isPersonZwjEmoji('π§')).toBeFalsy(); + expect(isPersonZwjEmoji('π§')).toBe(false); }); it('should not detect girl_tone5', () => { - expect(isPersonZwjEmoji('π§πΏ')).toBeFalsy(); + expect(isPersonZwjEmoji('π§πΏ')).toBe(false); }); it('should not detect man', () => { - expect(isPersonZwjEmoji('π¨')).toBeFalsy(); + expect(isPersonZwjEmoji('π¨')).toBe(false); }); it('should not detect woman', () => { - expect(isPersonZwjEmoji('π©')).toBeFalsy(); + expect(isPersonZwjEmoji('π©')).toBe(false); }); }); @@ -298,13 +298,13 @@ describe('emoji', () => { it('should gracefully handle empty string with unicode support', () => { const isSupported = isEmojiUnicodeSupported({ '1.0': true }, '', '1.0'); - expect(isSupported).toBeTruthy(); + expect(isSupported).toBe(true); }); it('should gracefully handle empty string without unicode support', () => { const isSupported = isEmojiUnicodeSupported({}, '', '1.0'); - expect(isSupported).toBeFalsy(); + expect(isSupported).toBeUndefined(); }); it('bomb(6.0) with 6.0 support', () => { @@ -316,7 +316,7 @@ describe('emoji', () => { emojiFixtureMap[emojiKey].unicodeVersion, ); - expect(isSupported).toBeTruthy(); + expect(isSupported).toBe(true); }); it('bomb(6.0) without 6.0 support', () => { @@ -328,7 +328,7 @@ describe('emoji', () => { emojiFixtureMap[emojiKey].unicodeVersion, ); - expect(isSupported).toBeFalsy(); + expect(isSupported).toBe(false); }); it('bomb(6.0) without 6.0 but with 9.0 support', () => { @@ -340,7 +340,7 @@ describe('emoji', () => { emojiFixtureMap[emojiKey].unicodeVersion, ); - expect(isSupported).toBeFalsy(); + expect(isSupported).toBe(false); }); it('construction_worker_tone5(8.0) without skin tone modifier support', () => { @@ -367,7 +367,7 @@ describe('emoji', () => { emojiFixtureMap[emojiKey].unicodeVersion, ); - expect(isSupported).toBeFalsy(); + expect(isSupported).toBe(false); }); it('use native keycap on >=57 chrome', () => { @@ -386,7 +386,7 @@ describe('emoji', () => { emojiFixtureMap[emojiKey].unicodeVersion, ); - expect(isSupported).toBeTruthy(); + expect(isSupported).toBe(true); }); it('fallback keycap on <57 chrome', () => { @@ -405,7 +405,7 @@ describe('emoji', () => { emojiFixtureMap[emojiKey].unicodeVersion, ); - expect(isSupported).toBeFalsy(); + expect(isSupported).toBe(false); }); }); |