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

escalation_utils_spec.js « incidents « components « sidebar « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d9e7f29c10ece30a5628592a3c4cfeb754cbbddd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { STATUS_ACKNOWLEDGED } from '~/sidebar/constants';
import { getStatusLabel } from '~/sidebar/utils';

describe('EscalationUtils', () => {
  describe('getStatusLabel', () => {
    it('returns a label when provided with a valid status', () => {
      const label = getStatusLabel(STATUS_ACKNOWLEDGED);

      expect(label).toEqual('Acknowledged');
    });

    it("returns 'None' when status is null", () => {
      const label = getStatusLabel(null);

      expect(label).toEqual('None');
    });
  });
});