Skip to content

test: reach 80% coverage threshold in @liexp/backend #3337

Description

@ascariandrea

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

  1. Identify pure utility functions and pipe-based transformations that can be tested in isolation
  2. Mock Effect layers/services for unit testing provider logic
  3. Add unit tests for any data-mapping, serialization, or validation helpers

How to check progress

```bash
pnpm --filter @liexp/backend test:coverage
```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions