Files
formbricks/apps/web/modules/auth/invite/components/content-layout.test.tsx
T
Johannes 154c85a0f7 test: add test to multiple files (#5719)
Co-authored-by: Victor Santos <victor@formbricks.com>
2025-05-08 19:24:50 +00:00

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();
});
});