From 1699d2bf679e336cc89ccab5bb8ef7e1101e721d Mon Sep 17 00:00:00 2001 From: nsfisis 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 --- frontend/app/config.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 frontend/app/config.test.ts (limited to 'frontend/app/config.test.ts') diff --git a/frontend/app/config.test.ts b/frontend/app/config.test.ts new file mode 100644 index 0000000..6989635 --- /dev/null +++ b/frontend/app/config.test.ts @@ -0,0 +1,16 @@ +import { describe, expect, test } from "vitest"; +import { API_BASE_PATH, APP_NAME, BASE_PATH } from "./config"; + +describe("config", () => { + test("BASE_PATH defaults to /", () => { + expect(BASE_PATH).toBe("/"); + }); + + test("API_BASE_PATH is based on BASE_PATH", () => { + expect(API_BASE_PATH).toBe(`${BASE_PATH}api/`); + }); + + test("APP_NAME is defined", () => { + expect(APP_NAME).toBeTruthy(); + }); +}); -- cgit v1.3.1