Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(release-notes) running unemojify on release notes
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { getName } from '../../test/util'; | ||
import { setEmojiConfig, unemojify } from './emoji'; | ||
|
||
describe(getName(__filename), () => { | ||
it('strips emojis when the config has been set accordingly', () => { | ||
const emoji = '🚀💎'; | ||
const otherText = 'regular text'; | ||
const text = `${emoji} ${otherText}`; | ||
setEmojiConfig({ unicodeEmoji: false }); | ||
const result = unemojify(text); | ||
expect(result).not.toContain(emoji); | ||
}); | ||
|
||
it('does not strip emojis when the config demands it', () => { | ||
const emoji = '🚀💎'; | ||
const otherText = 'regular text'; | ||
const text = `${emoji} ${otherText}`; | ||
setEmojiConfig({ unicodeEmoji: true }); | ||
const result = unemojify(text); | ||
expect(result).toEqual(text); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters