diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js b/spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js index e4db67f5b18..f226dabb8a0 100644 --- a/spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js +++ b/spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js @@ -53,6 +53,12 @@ describe('StackedProgressBarComponent', () => { it('returns percentage as `< 1` from provided count based on `totalCount` when evaluated value is less than 1', () => { expect(vm.getPercent(10)).toBe('< 1'); }); + + it('returns 0 if totalCount is falsy', () => { + vm = createComponent({ totalCount: 0 }); + + expect(vm.getPercent(100)).toBe(0); + }); }); describe('barStyle', () => { |