Add undefined case to pluralize unit tests
This commit is contained in:
@@ -13,5 +13,8 @@ describe('word helpers', () => {
|
||||
it('should return the plural form if the number is greater than 1', () => {
|
||||
expect(pluralize(7, 'thing', 'things')).to.eq('7 things');
|
||||
});
|
||||
it('should return the empty string if the number is undefined', () => {
|
||||
expect(pluralize(undefined, 'thing', 'things')).to.eq('');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user