Welcome to mirror list, hosted at ThFree Co, Russian Federation.

utils_spec.js « emoji « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 397388ca0aecc2fb6b24db460c7c0e787674f4d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
    });
  });
});