From 1699d2bf679e336cc89ccab5bb8ef7e1101e721d Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Mon, 16 Feb 2026 23:10:11 +0900
Subject: test(frontend): add Vitest test infrastructure and sample tests

Set up Vitest with @testing-library/react and jsdom for frontend
unit testing. Add sample tests for config.ts and BorderedContainer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
 frontend/app/components/BorderedContainer.test.tsx | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 frontend/app/components/BorderedContainer.test.tsx

(limited to 'frontend/app/components/BorderedContainer.test.tsx')

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");
+	});
+});
-- 
cgit v1.3.1

