Skip to content

Test: Raise backend + frontend unit-test coverage #260

Description

@prem22k

Coverage is thin and uneven. Current state (this session):

  • Backend: 12 test files (~45 tests) covering security/webhook/encryption paths, but core routes like projectRoutes.js, userRoutes.js, uploadRoutes.js have little or no direct coverage.
  • Frontend: only 2 vitest files (26 tests) after wiring Vitest; most components are untested.
  • CI uses jest --passWithNoTests (root) which masks zero-test suites.

Work needed:

  • Remove --passWithNoTests so empty suites fail CI
  • Add coverage thresholds (e.g. jest --coverage --coverageThreshold) for the backend security-critical paths
  • Add unit tests for projectRoutes quota gate (usageService), upload auth, collaborator route
  • Add a few frontend component smoke tests (ArchitectureMap, Dashboard)

Why: the 3 backend test failures found this session were only caught because CI ran them; higher coverage prevents regressions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:testsTest files and testing infrastructureenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions