Skip to content

Commit

Permalink
feat: Add test for DefaultTemplate component.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryohidaka committed May 24, 2024
1 parent 619c7ef commit 02c8219
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/default.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { render, screen } from "@testing-library/react";
import "@testing-library/jest-dom";
import DefaultTemplate from "./default";

describe("DefaultTemplate", () => {
it("renders the title correctly", () => {
const title = "Test Title";
render(DefaultTemplate(title));

const titleElement = screen.getByText(title);
expect(titleElement).toBeInTheDocument();
expect(titleElement).toHaveStyle({ fontSize: "60px", fontWeight: "700" });
});
});

0 comments on commit 02c8219

Please sign in to comment.