// src/components/Footer.test.tsx import React from 'react'; import { render, screen } from '@testing-library/react'; import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { Footer } from './Footer'; describe('Footer', () => { beforeEach(() => { // Set up fake timers to control the date vi.useFakeTimers(); }); afterEach(() => { // Restore real timers after each test vi.useRealTimers(); }); it('should render the copyright notice with the correct year', () => { // Arrange: Set a specific date for a predictable test outcome const mockDate = new Date('2025-08-22T10:00:00Z'); vi.setSystemTime(mockDate); // Act: Render the component render(