import React from 'react'; import { render, screen } from '@testing-library/react'; import '@testing-library/jest-dom'; import Footer from '../../components/Footer'; // Mock des dépendances jest.mock('@/lib/project.config', () => ({ PROJECT_CONFIG: { repository: { url: 'https://github.com/example/repo' } } })); jest.mock('@/lib/services', () => ({ settingsService: { getStringValue: jest.fn().mockResolvedValue('Développé avec ❤️ pour faciliter la démocratie participative - [Logiciel libre et open source](GITURL) et transparent pour tous') } })); describe('Footer', () => { beforeEach(() => { // Mock des variables d'environnement process.env.NEXT_PUBLIC_SUPABASE_URL = 'https://test.supabase.co'; process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY = 'test-key'; }); afterEach(() => { jest.clearAllMocks(); }); it('should render footer with basic content', async () => { render(