import { render } from "@testing-library/react";
import { BrowserRouter } from "react-router-dom";
import { describe, expect, it, vi } from "vitest";
import { LandingPage } from "./landing";

// Mock Header component
vi.mock("../components/header", () => ({
  Header: () => <div data-testid="header">Header</div>,
}));

// Mock AnimatedBackground
vi.mock("../components/AnimatedBackground", () => ({
  AnimatedBackground: () => <div data-testid="animated-background">Background</div>,
}));

describe("LandingPage", () => {
  it("renders without crashing", () => {
    const { container } = render(
      <BrowserRouter>
        <LandingPage />
      </BrowserRouter>
    );
    expect(container).toBeInTheDocument();
  });

  // Note: LandingPage returns null and redirects immediately, so we can't test much
});
