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

single_stat_spec.js « charts « monitoring « javascripts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6adca0b0eede7a8541666c6f846aaebb4d5d9560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { shallowMount, createLocalVue } from '@vue/test-utils';
import SingleStatChart from '~/monitoring/components/charts/single_stat.vue';
import { graphDataPrometheusQuery } from '../mock_data';

const localVue = createLocalVue();

describe('Single Stat Chart component', () => {
  let singleStatChart;

  beforeEach(() => {
    singleStatChart = shallowMount(localVue.extend(SingleStatChart), {
      propsData: {
        graphData: graphDataPrometheusQuery,
      },
      sync: false,
      localVue,
    });
  });

  afterEach(() => {
    singleStatChart.destroy();
  });

  describe('computed', () => {
    describe('engineeringNotation', () => {
      it('should interpolate the value and unit props', () => {
        expect(singleStatChart.vm.engineeringNotation).toBe('91MB');
      });
    });
  });
});