have you considered when the post comment number is 1, so it is comment without 's'
Opened this issue · 0 comments
zzz6519003 commented
it('should correctly render the footer text comments as plural for multiple comments', function () {
var post = {
points: 5,
postedBy: 'Prabir Shrestha',
postedAgo: '4 hours ago',
commentCount: 7
};
var footer = TestUtils.renderIntoDocument(<Footer post={post} />);
var small = TestUtils.findRenderedDOMComponentWithTag(footer, 'small');
var text = small.getDOMNode().textContent;
expect(text.indexOf('comments', text.length - 'comments'.length)).not.toBe(-1);
notice the line expect(text.indexOf('comments', text.length - 'comments'.length)).not.toBe(-1);
have you considered when the post comment number is 1, so it is comment without 's'