import React from "react";
import { render } from "@testing-library/react";
import "@testing-library/jest-dom";
import { TimelineProps } from "../TimelineProps";
import Timeline from "../Timeline";

describe("Timeline Component", () => {
  const props: TimelineProps = {
    alterMode: true,
    className: "custom-class",
    collapsibleEvents: true,
    dateFormat: "MM/dd/yyyy",
    events: [],
    navigatable: true,
    transitionDuration: 300,
  };

  it("renders all props correctly", () => {
    render(<Timeline {...props} />);
  });

  it("matches the snapshot", () => {
    const { asFragment } = render(<Timeline {...props} />);
    expect(asFragment()).toMatchSnapshot();
  });
});
