Dashboard.spec.tsx 531 B

12345678910111213141516
  1. import React from 'react';
  2. import Dashboard from 'components/Dashboard/Dashboard';
  3. import { render } from 'lib/testHelpers';
  4. import { screen } from '@testing-library/dom';
  5. jest.mock('components/Dashboard/ClustersWidget/ClustersWidget', () => () => (
  6. <div>mock-ClustersWidget</div>
  7. ));
  8. describe('Dashboard', () => {
  9. it('renders ClustersWidget', () => {
  10. render(<Dashboard />);
  11. expect(screen.getByText('Dashboard')).toBeInTheDocument();
  12. expect(screen.getByText('mock-ClustersWidget')).toBeInTheDocument();
  13. });
  14. });