Skip to content

[Modifications] Unify the two test directory conventions (src/__tests__/ and tests/) #1024

Description

@RUKAYAT-CODER

Overview

Tests live under two roots — src/__tests__/ and tests/ — plus colocated __tests__ directories inside src/components/ and src/services/, plus a _tests_ directory (single underscores) under src/components/dashboard/ that eslint.config.js explicitly ignores, plus two stray test files in report/ that Jest never picks up. Several modules have tests in both roots: axios.config.test.ts exists at src/__tests__/services/api/, tests/, and tests/services/api/ — three copies. This makes it impossible to know whether a module is tested without searching four locations.

Specifications

Features:

  • One test-location convention, documented
  • Duplicate test files merged
  • The _tests_ directory renamed and un-ignored

Tasks:

  • Choose colocated __tests__ or a top-level tests/ mirror and document the decision
  • Merge the three axios.config.test.ts copies and any other duplicates
  • Rename src/components/dashboard/_tests_/ and remove the ESLint ignore
  • Move or delete the stray tests in report/
  • Update jest.config.js roots and CONTRIBUTING.md

Impacted Files:

  • src/__tests__/
  • tests/
  • src/components/dashboard/_tests_/
  • report/
  • jest.config.js
  • CONTRIBUTING.md

Acceptance Criteria

  • Tests live in one documented location
  • No module has tests in two places
  • Every test file is inside a Jest root

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions