import {render, screen} from 'sentry-test/reactTestingLibrary'; import UserMisery from 'sentry/components/userMisery'; describe('UserMisery', function () { it('renders no bars when user misery is less than 0.05', function () { render( ); expect(screen.getByTestId('score-bar-0')).toBeInTheDocument(); }); it('renders no bars when user misery is equal to 0.05', function () { render( ); expect(screen.getByTestId('score-bar-0')).toBeInTheDocument(); }); it('renders one bar when user misery is greater than 0.05', function () { render( ); expect(screen.getByTestId('score-bar-1')).toBeInTheDocument(); }); });