diff options
| author | Filipa Lacerda <filipa@gitlab.com> | 2017-10-10 07:47:42 +0000 |
|---|---|---|
| committer | Phil Hughes <me@iamphill.com> | 2017-10-10 07:47:42 +0000 |
| commit | 67f4408d741b62e61f1fd767b4724727c489b42c (patch) | |
| tree | 7e7eb50c2797ad968bb238472036d6b2d39c4555 /spec/javascripts/lib/utils | |
| parent | d6170ce4d8a0cbfd8552531c29163e44549222cf (diff) | |
| download | gitlab-ce-67f4408d741b62e61f1fd767b4724727c489b42c.tar.gz | |
Fix bad type checking to prevent 0 count badge to be shown
Diffstat (limited to 'spec/javascripts/lib/utils')
| -rw-r--r-- | spec/javascripts/lib/utils/text_utility_spec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/javascripts/lib/utils/text_utility_spec.js b/spec/javascripts/lib/utils/text_utility_spec.js index f1a975ba962..829b3ef5735 100644 --- a/spec/javascripts/lib/utils/text_utility_spec.js +++ b/spec/javascripts/lib/utils/text_utility_spec.js @@ -1,4 +1,4 @@ -import '~/lib/utils/text_utility'; +import { highCountTrim } from '~/lib/utils/text_utility'; describe('text_utility', () => { describe('gl.text.getTextWidth', () => { @@ -35,14 +35,14 @@ describe('text_utility', () => { }); }); - describe('gl.text.highCountTrim', () => { + describe('highCountTrim', () => { it('returns 99+ for count >= 100', () => { - expect(gl.text.highCountTrim(105)).toBe('99+'); - expect(gl.text.highCountTrim(100)).toBe('99+'); + expect(highCountTrim(105)).toBe('99+'); + expect(highCountTrim(100)).toBe('99+'); }); it('returns exact number for count < 100', () => { - expect(gl.text.highCountTrim(45)).toBe(45); + expect(highCountTrim(45)).toBe(45); }); }); |
