blob: 78bcc40078730d587f0b0c8fda080426b276d9d5 (
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');
});
});
});
});
|