import {mountWithTheme} from 'sentry-test/enzyme'; import ScoreBar from 'sentry/components/scoreBar'; import UserMisery from 'sentry/components/userMisery'; describe('UserMisery', function () { beforeEach(function () {}); afterEach(function () {}); it('renders no bars when user misery is less than 0.05', function () { const wrapper = mountWithTheme( ); expect(wrapper.find(ScoreBar).props().score).toEqual(0); }); it('renders no bars when user misery is equal to 0.05', function () { const wrapper = mountWithTheme( ); expect(wrapper.find(ScoreBar).props().score).toEqual(0); }); it('renders one bar when user misery is greater than 0.05', function () { const wrapper = mountWithTheme( ); expect(wrapper.find(ScoreBar).props().score).toEqual(1); }); });