Add undefined case to pluralize unit tests

This commit is contained in:
shati-patel
2022-10-24 10:44:16 +01:00
parent 593ca57497
commit 8737cfde0b

View File

@@ -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('');
});
});
});