From 4428bb27b78bf8f75d8ff15c227a8dfbb82aaa8e Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 1 Feb 2017 15:23:01 +0000 Subject: Removed Masonry, instead uses groups of data Added some error handling which reverts the frontend data changes & notifies the user --- spec/javascripts/lib/utils/text_utility_spec.js.es6 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'spec/javascripts/lib/utils/text_utility_spec.js.es6') diff --git a/spec/javascripts/lib/utils/text_utility_spec.js.es6 b/spec/javascripts/lib/utils/text_utility_spec.js.es6 index e97356b65d5..329e18f405a 100644 --- a/spec/javascripts/lib/utils/text_utility_spec.js.es6 +++ b/spec/javascripts/lib/utils/text_utility_spec.js.es6 @@ -21,5 +21,19 @@ expect(largeFont > regular).toBe(true); }); }); + + describe('gl.text.pluralize', () => { + it('returns pluralized', () => { + expect(gl.text.pluralize('test', 2)).toBe('tests'); + }); + + it('returns pluralized', () => { + expect(gl.text.pluralize('test', 0)).toBe('tests'); + }); + + it('does not return pluralized', () => { + expect(gl.text.pluralize('test', 1)).toBe('test'); + }); + }); }); })(); -- cgit v1.2.1