aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/BorderedContainer.test.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/components/BorderedContainer.test.tsx')
-rw-r--r--frontend/app/components/BorderedContainer.test.tsx33
1 files changed, 33 insertions, 0 deletions
diff --git a/frontend/app/components/BorderedContainer.test.tsx b/frontend/app/components/BorderedContainer.test.tsx
new file mode 100644
index 0000000..2d1b663
--- /dev/null
+++ b/frontend/app/components/BorderedContainer.test.tsx
@@ -0,0 +1,33 @@
+/**
+ * @vitest-environment jsdom
+ */
+import { cleanup, render, screen } from "@testing-library/react";
+import { afterEach, describe, expect, test } from "vitest";
+import BorderedContainer from "./BorderedContainer";
+
+afterEach(() => {
+ cleanup();
+});
+
+describe("BorderedContainer", () => {
+ test("renders children", () => {
+ render(<BorderedContainer>Hello World</BorderedContainer>);
+ expect(screen.getByText("Hello World")).toBeDefined();
+ });
+
+ test("applies custom className", () => {
+ render(
+ <BorderedContainer className="custom-class">Content</BorderedContainer>,
+ );
+ const container = screen.getByText("Content").closest("div");
+ expect(container?.className).toContain("custom-class");
+ });
+
+ test("has default border styling", () => {
+ render(<BorderedContainer>Styled</BorderedContainer>);
+ const container = screen.getByText("Styled").closest("div");
+ expect(container?.className).toContain("border-2");
+ expect(container?.className).toContain("border-blue-600");
+ expect(container?.className).toContain("rounded-xl");
+ });
+});