You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`npm run start`| Run the production server (after `build`) |
79
+
|`npm run lint`| ESLint (Next.js + TypeScript rules) |
80
+
|`npm run test`| Vitest — runs all `*.test.ts(x)` / `*.spec.ts(x)` files |
81
+
82
+
Requirements: **Node.js 20+** (matches CI).
83
+
84
+
## Testing 🧪
85
+
86
+
-**Runner:**[Vitest](https://vitest.dev/) v4 with **jsdom** as the test environment.
87
+
-**Assertions / DOM:**[@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) and [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) (via `vitest.setup.ts`).
88
+
-**Config:**`frontend/vitest.config.ts` — path alias `@/` matches the Next.js app, `include` pattern `**/*.{test,spec}.{ts,tsx}`.
89
+
-**Current tests:**`frontend/app/page.test.tsx` — smoke test for the landing page (branding, primary heading, signup links).
90
+
91
+
Add new tests next to the code they cover using the `*.test.tsx` (or `.test.ts`) naming convention.
92
+
93
+
## Continuous integration (GitHub Actions) 🔄
94
+
95
+
Workflows live under [`.github/workflows/`](.github/workflows/) and run on **push** and **pull_request** to **`main`**. Both use **Node 20** and `npm ci` in **`frontend/`**.
96
+
97
+
| Workflow | File | What it runs |
98
+
|----------|------|----------------|
99
+
|**Linter**|[`ci.yml`](.github/workflows/ci.yml)|`npm run lint`|
100
+
|**Frontend**|[`frontend-tests.yml`](.github/workflows/frontend-tests.yml)|`npm run test` (Vitest) |
101
+
102
+
Together they keep ESLint clean and the Vitest suite passing on every change to `main`.
0 commit comments