members_count will never be null

This commit is contained in:
Alex Gleason 2023-03-10 13:46:20 -06:00
parent 6a2c64ae45
commit 1af67c3a25
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 0 additions and 18 deletions

View file

@ -9,20 +9,6 @@ import GroupMemberCount from '../group-member-count';
let group: Group;
describe('<GroupMemberCount />', () => {
describe('without support for "members_count"', () => {
beforeEach(() => {
group = normalizeGroup({
members_count: undefined,
});
});
it('should return null', () => {
render(<GroupMemberCount group={group} />);
expect(screen.queryAllByTestId('group-member-count')).toHaveLength(0);
});
});
describe('with support for "members_count"', () => {
describe('with 1 member', () => {
beforeEach(() => {

View file

@ -10,10 +10,6 @@ interface IGroupMemberCount {
}
const GroupMemberCount = ({ group }: IGroupMemberCount) => {
if (typeof group.members_count === 'undefined') {
return null;
}
return (
<Text theme='inherit' tag='span' size='sm' weight='medium' data-testid='group-member-count'>
{shortNumberFormat(group.members_count)}