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

chart_utils_spec.js « utils « lib « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 65bb68c501731608edc6c02fec0c84f13f5d645a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { firstAndLastY } from '~/lib/utils/chart_utils';

describe('Chart utils', () => {
  describe('firstAndLastY', () => {
    it('returns the first and last y-values of a given data set as an array', () => {
      const data = [
        ['', 1],
        ['', 2],
        ['', 3],
      ];

      expect(firstAndLastY(data)).toEqual([1, 3]);
    });
  });
});