Skip to content

[Infrastructure] Set up Comprehensive Testing Suite (Vitest & Jest) #956

Description

@Adithyakp86

📂 Category

None

📘 Additional Context (Optional)

Description
The project currently lacks any automated testing infrastructure. There are no unit, integration, or end-to-end tests for either the React frontend or the Node.js backend. This makes the codebase vulnerable to regressions and increases the manual effort required for PR reviews.

Impact

  • Quality Assurance: No way to automatically verify that new changes don't break existing functionality.
  • Contributor Confidence: New contributors have no way to test their changes locally before submitting a PR.
  • Maintainability: Long-term maintenance becomes significantly harder as the codebase grows without a test safety net.

Proposed Solution

  1. Frontend Testing: Install and configure Vitest and React Testing Library. Set up sample unit tests for core UI components (e.g., Navbar, Button).
  2. Backend Testing: Install and configure Jest or Vitest for the backend. Implement integration tests for authentication routes (/register, /login).
  3. CI Integration: Add a GitHub Action to automatically run tests on every Pull Request.

Evidence

  • No test/ or __tests__ directories found in the project.
  • No testing dependencies (jest, vitest, etc.) listed in package.json or backend/package.json.
  • No test script defined in the scripts section of either package.json.

Assign this issue to me under the oscg

🙌 Contributor Checklist (Optional)

  • I have searched existing issues to avoid duplicates
  • I agree to follow this project's Code of Conduct
  • I am a GSSOC'25 contributor
  • I want to work on this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions