diff options
Diffstat (limited to 'spec/frontend/monitoring/components/charts/single_stat_spec.js')
-rw-r--r-- | spec/frontend/monitoring/components/charts/single_stat_spec.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/frontend/monitoring/components/charts/single_stat_spec.js b/spec/frontend/monitoring/components/charts/single_stat_spec.js index 37712eb3012..144a4e0c968 100644 --- a/spec/frontend/monitoring/components/charts/single_stat_spec.js +++ b/spec/frontend/monitoring/components/charts/single_stat_spec.js @@ -27,8 +27,12 @@ describe('Single Stat Chart component', () => { describe('computed', () => { describe('statValue', () => { - it('should interpolate the value and unit props', () => { - expect(findChart().props('value')).toBe('1.00MB'); + it('should display the correct value', () => { + expect(findChart().props('value')).toBe('1.00'); + }); + + it('should display the correct value unit', () => { + expect(findChart().props('unit')).toBe('MB'); }); it('should change the value representation to a percentile one', () => { @@ -36,7 +40,8 @@ describe('Single Stat Chart component', () => { graphData: singleStatGraphData({ max_value: 120 }, { value: 91 }), }); - expect(findChart().props('value')).toContain('75.83%'); + expect(findChart().props('value')).toBe('75.83'); + expect(findChart().props('unit')).toBe('%'); }); it('should display NaN for non numeric maxValue values', () => { |