mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-07 11:20:39 -05:00
154c85a0f7
Co-authored-by: Victor Santos <victor@formbricks.com>
28 lines
853 B
TypeScript
28 lines
853 B
TypeScript
import "@testing-library/jest-dom/vitest";
|
|
import { cleanup, render, screen } from "@testing-library/react";
|
|
import { afterEach, describe, expect, test } from "vitest";
|
|
import { ContentLayout } from "./content-layout";
|
|
|
|
describe("ContentLayout", () => {
|
|
afterEach(() => {
|
|
cleanup();
|
|
});
|
|
|
|
test("renders headline and description", () => {
|
|
render(<ContentLayout headline="Test Headline" description="Test Description" />);
|
|
|
|
expect(screen.getByText("Test Headline")).toBeInTheDocument();
|
|
expect(screen.getByText("Test Description")).toBeInTheDocument();
|
|
});
|
|
|
|
test("renders children when provided", () => {
|
|
render(
|
|
<ContentLayout headline="Test Headline" description="Test Description">
|
|
<div>Test Child</div>
|
|
</ContentLayout>
|
|
);
|
|
|
|
expect(screen.getByText("Test Child")).toBeInTheDocument();
|
|
});
|
|
});
|