Skip to content

Commit 8737cfd

Browse files
committed
Add undefined case to pluralize unit tests
1 parent 593ca57 commit 8737cfd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extensions/ql-vscode/test/pure-tests/word.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ describe('word helpers', () => {
1313
it('should return the plural form if the number is greater than 1', () => {
1414
expect(pluralize(7, 'thing', 'things')).to.eq('7 things');
1515
});
16+
it('should return the empty string if the number is undefined', () => {
17+
expect(pluralize(undefined, 'thing', 'things')).to.eq('');
18+
});
1619
});
1720
});

0 commit comments

Comments
 (0)