diff options
author | mhasbini <mohammad.hasbini@gmail.com> | 2017-02-21 21:21:49 +0200 |
---|---|---|
committer | mhasbini <mohammad.hasbini@gmail.com> | 2017-02-21 21:21:49 +0200 |
commit | 0a53a3d9664187cbd8c72c24666a8ff03f3dccec (patch) | |
tree | a3bf55f0d7403ed662a09a413b23f876587deebe /spec/javascripts/lib | |
parent | 881529495379505542033bf7fb0d91cdc5b51e8d (diff) | |
download | gitlab-ce-0a53a3d9664187cbd8c72c24666a8ff03f3dccec.tar.gz |
change todos counter position & format ( for large counts )
Diffstat (limited to 'spec/javascripts/lib')
-rw-r--r-- | spec/javascripts/lib/utils/text_utility_spec.js.es6 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/javascripts/lib/utils/text_utility_spec.js.es6 b/spec/javascripts/lib/utils/text_utility_spec.js.es6 index 86ade66ec29..06b69b8ac17 100644 --- a/spec/javascripts/lib/utils/text_utility_spec.js.es6 +++ b/spec/javascripts/lib/utils/text_utility_spec.js.es6 @@ -35,5 +35,16 @@ require('~/lib/utils/text_utility'); expect(gl.text.pluralize('test', 1)).toBe('test'); }); }); + + describe('gl.text.highCountTrim', () => { + it('returns 99+ for count >= 100', () => { + expect(gl.text.highCountTrim(105)).toBe('99+'); + expect(gl.text.highCountTrim(100)).toBe('99+'); + }); + + it('returns exact number for count < 100', () => { + expect(gl.text.highCountTrim(45)).toBe(45); + }); + }); }); })(); |