import { render, screen } from '@testing-library/react'; import NotFound from '@/app/not-found'; // Mock next/navigation jest.mock('next/navigation', () => ({ useRouter: () => ({ back: jest.fn(), push: jest.fn(), }), })); // Mock next-intl jest.mock('next-intl', () => ({ useLocale: () => 'en', useTranslations: () => (key: string) => key, })); describe('NotFound', () => { it('renders the 404 page with the new design text', () => { render(); expect(screen.getByText(/Page not/i)).toBeInTheDocument(); expect(screen.getByText(/Found/i)).toBeInTheDocument(); }); });