Files
portfolio/app/__tests__/not-found.test.tsx
denshooter 6fd4756f35
Some checks failed
Dev Deployment (Zero Downtime) / deploy-dev (push) Failing after 7m26s
fix: resolve all lint errors, improve type safety, and remove unused code
Remove unused imports, replace `any` types with proper interfaces in directus.ts
and i18n-loader.ts, exclude scripts/ and coverage/ from ESLint, and fix
unused variable warnings across the codebase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:46:35 +01:00

25 lines
614 B
TypeScript

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(<NotFound />);
expect(screen.getByText(/Page not/i)).toBeInTheDocument();
expect(screen.getByText(/Found/i)).toBeInTheDocument();
});
});