Skip to content

test: reach 80% coverage threshold in services/admin #3339

Description

@ascariandrea

Current state

Currently 0% — only one spec file exists (`useStreamingChat.spec.ts`) and the coverage `include` glob does not match it. Thresholds are set to 0% as a placeholder.

Metric Actual Target
Statements ~0% 80%
Branches ~0% 80%
Functions ~0% 80%
Lines ~0% 80%

Context

A spec project was added in #3334 (`services/admin/vitest.config.spec.ts`) to pick up unit tests. The threshold is intentionally 0% until real unit tests are added.

Recommended approach

  1. Add unit tests for hooks (e.g. `useStreamingChat` coverage is partial)
  2. Add unit tests for pure utility/helper functions
  3. Raise thresholds in `services/admin/vitest.config.spec.ts` incrementally as tests are added

How to check progress

```bash
pnpm --filter admin 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