import React from 'react'; import {initializeOrg} from 'sentry-test/initializeOrg'; import {mountWithTheme} from 'sentry-test/enzyme'; import GroupStore from 'app/stores/groupStore'; import StreamGroup from 'app/components/stream/group'; describe('StreamGroup', function() { let GROUP_1; beforeEach(function() { GROUP_1 = TestStubs.Group({ id: '1337', project: { id: '13', slug: 'test', }, type: 'error', }); jest.spyOn(GroupStore, 'get').mockImplementation(() => GROUP_1); }); afterEach(function() {}); it('renders with anchors', function() { const {routerContext} = initializeOrg(); const component = mountWithTheme( , routerContext ); expect(component.find('GuideAnchor').exists()).toBe(true); expect(component.find('GuideAnchor')).toHaveLength(2); expect(component).toSnapshot(); }); });