organizationRoot.spec.tsx 506 B

12345678910111213141516
  1. import {render} from 'sentry-test/reactTestingLibrary';
  2. import {setActiveProject} from 'sentry/actionCreators/projects';
  3. import OrganizationRoot from 'sentry/views/organizationRoot';
  4. jest.mock('sentry/actionCreators/projects', () => ({
  5. setActiveProject: jest.fn(),
  6. }));
  7. describe('OrganizationRoot', function () {
  8. it('sets active project as null when mounted', function () {
  9. render(<OrganizationRoot>{null}</OrganizationRoot>);
  10. expect(setActiveProject).toHaveBeenCalledWith(null);
  11. });
  12. });