Skip to content

Commit

Permalink
clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgraham4401 committed Jan 5, 2025
1 parent c170a97 commit 950b500
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions client/app/features/errorPage/ErrorPage.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { screen } from '@testing-library/react';
import { useNavigate } from 'react-router';
import { describe, expect, it, vi } from 'vitest';
import { renderWithProviders } from '~/mocks';
import { ErrorPage } from './ErrorPage';
Expand All @@ -19,14 +18,4 @@ describe('ErrorPage', () => {
renderWithProviders(<ErrorPage />);
expect(screen.getByText(/not found/i)).toBeInTheDocument();
});

it('navigates back when Return button is clicked', () => {
const navigate = vi.fn();
vi.mocked(useNavigate).mockReturnValue(navigate);

renderWithProviders(<ErrorPage />);

screen.getByText('Return').click();
expect(navigate).toHaveBeenCalledWith(-1);
});
});

0 comments on commit 950b500

Please sign in to comment.