import { render, screen } from "@testing-library/react";
import { ThemeToggle } from "@/app/components/ThemeToggle";

// Mock custom ThemeProvider
jest.mock("@/app/components/ThemeProvider", () => ({
  useTheme: () => ({
    theme: "light",
    setTheme: jest.fn(),
  }),
  ThemeProvider: ({ children }: { children: React.ReactNode }) => <>{children}</>,
}));

describe("ThemeToggle Component", () => {
  it("renders the theme toggle button", () => {
    render(<ThemeToggle />);
    // Initial render should have the button
    expect(screen.getByRole("button")).toBeInTheDocument();
  });
});
