import {render} from 'sentry-test/reactTestingLibrary'; import QueryCount from 'sentry/components/queryCount'; describe('QueryCount', function () { it('displays count when no max', function () { const {container} = render(); expect(container).toSnapshot(); }); it('displays count when count < max', function () { const {container} = render(); expect(container).toSnapshot(); }); it('does not render if count is 0', function () { const {container} = render(); expect(container).toBeEmptyDOMElement(); }); it('can render when count is 0 when `hideIfEmpty` is false', function () { const {container} = render(); expect(container).toSnapshot(); }); it('displays max count if count >= max', function () { const {container} = render(); expect(container).toSnapshot(); }); });