Skip to content

[ENHANCEMENT] Add four area-scoped Vitest configs (api, core, services, misc) #115

Description

@edelauna

Problem (one or two sentences)

The single vitest.config.ts runs all ~369 area-unit tests in one pass, making it impossible to cache or parallelize coverage by ownership area.

Context (who is affected and when)

Current test file distribution: core/ (117 files), services/ (110), api/ (79), and misc areas — integrations, utils, shared, activate, extension (~63). Each is a stable ownership boundary with few cross-area test dependencies. This is part of the coverage-slicing work tracked in #47 and depends on #114.

Desired behavior (conceptual, not technical)

Four isolated Vitest configs exist (vitest.api.config.ts, vitest.core.config.ts, vitest.services.config.ts, vitest.misc.config.ts), each scoping include to its directory and writing coverage output to coverage/{area}/.

Constraints / preferences (optional)

  • Do not modify the existing vitest.config.ts — it must remain functional for local full-suite runs.
  • Each area config must be runnable independently: vitest run --config vitest.{area}.config.ts --coverage.
  • misc covers: integrations/, utils/, shared/, activate/, extension/.

Request checklist

  • I've searched existing Issues and Discussions for duplicates
  • This describes a specific problem with clear context and impact

Acceptance criteria (optional)

  • Each of the four configs runs successfully in isolation.
  • Each produces a coverage/{area}/lcov.info file.

Proposed approach (optional)

Create four config files mirroring the base vitest.config.ts settings, with include and coverage.include narrowed to the respective directory. Use coverage.reportsDirectory to isolate output per area.

Trade-offs / risks (optional)

If a test file in one area imports source from another area, coverage for that imported code won't appear in the area slice — it will be captured in the merged report only. This is acceptable; the merged report remains the source of truth.


Parent issue: #47
Depends on: #114

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions