Current state
| Metric |
Actual |
Target |
| Statements |
20.6% |
80% |
| Branches |
11.9% |
80% |
| Functions |
12.3% |
80% |
| Lines |
20.9% |
80% |
Context
The 80% threshold is enforced in packages/@liexp/backend/vitest.config.ts as part of #3334. This is the largest gap in the monorepo — most backend code is infrastructure/providers that currently have no unit tests.
Why coverage is low
Most of @liexp/backend is provider/adapter code (DB clients, HTTP adapters, Effect layers) that is tested only via e2e tests in api and worker, which require a live database and are excluded from the unit test run.
Recommended approach
- Identify pure utility functions and pipe-based transformations that can be tested in isolation
- Mock Effect layers/services for unit testing provider logic
- Add unit tests for any data-mapping, serialization, or validation helpers
How to check progress
```bash
pnpm --filter @liexp/backend test:coverage
```
Current state
Context
The 80% threshold is enforced in
packages/@liexp/backend/vitest.config.tsas part of #3334. This is the largest gap in the monorepo — most backend code is infrastructure/providers that currently have no unit tests.Why coverage is low
Most of
@liexp/backendis provider/adapter code (DB clients, HTTP adapters, Effect layers) that is tested only via e2e tests inapiandworker, which require a live database and are excluded from the unit test run.Recommended approach
How to check progress
```bash
pnpm --filter @liexp/backend test:coverage
```