|
@@ -340,6 +340,13 @@ pytest backend/tests/unit/ # Unit tests only
|
|
|
pytest backend/tests/ --cov=backend # With coverage
|
|
pytest backend/tests/ --cov=backend # With coverage
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
+`conftest.py` redirects `DATABASE_URL` to a throwaway SQLite file before any app
|
|
|
|
|
+module is imported, and aborts the run if that redirect did not take. Your `.env`
|
|
|
|
|
+is ignored for the duration, so the suite cannot reach the database you develop
|
|
|
|
|
+against — it exercises code paths that open their own sessions, and some of those
|
|
|
|
|
+write. Don't undo that override to "test against real data": point `DATABASE_URL`
|
|
|
|
|
+at a copy instead.
|
|
|
|
|
+
|
|
|
**Frontend** — tests use [Vitest](https://vitest.dev/) and are in `frontend/src/__tests__/`:
|
|
**Frontend** — tests use [Vitest](https://vitest.dev/) and are in `frontend/src/__tests__/`:
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|