diff options
Diffstat (limited to 'spec/frontend/emoji/utils_spec.js')
-rw-r--r-- | spec/frontend/emoji/utils_spec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/frontend/emoji/utils_spec.js b/spec/frontend/emoji/utils_spec.js new file mode 100644 index 00000000000..397388ca0ae --- /dev/null +++ b/spec/frontend/emoji/utils_spec.js @@ -0,0 +1,15 @@ +import { getEmojiScoreWithIntent } from '~/emoji/utils'; + +describe('Utils', () => { + describe('getEmojiScoreWithIntent', () => { + it.each` + emojiName | baseScore | finalScore + ${'thumbsup'} | ${1} | ${1} + ${'thumbsdown'} | ${1} | ${3} + ${'neutralemoji'} | ${1} | ${2} + ${'zerobaseemoji'} | ${0} | ${1} + `('returns the correct score for $emojiName', ({ emojiName, baseScore, finalScore }) => { + expect(getEmojiScoreWithIntent(emojiName, baseScore)).toBe(finalScore); + }); + }); +}); |