import '@testing-library/jest-dom' import React from 'react' import { render } from '@testing-library/react' import ThemeWrapper from './Theme' // Mock the ThemeProvider from next-themes jest.mock('next-themes', () => ({ ThemeProvider: ({ children }: { children: React.ReactNode }) => (
{children}
), })) describe('ThemeWrapper', () => { it('renders children within ThemeProvider', () => { const { getByText } = render(
Child Component
) // Check if the child component is rendered expect(getByText('Child Component')).toBeInTheDocument() }) })