Skip to content

Test: Setup Vitest or Jest for the Frontend #11

Description

@armannhansda

The Issue

We currently do not have a unit testing framework set up for the React frontend, making it difficult for contributors to write tests for utility functions or components.

The Solution

Set up a modern testing framework (preferably Vitest with React Testing Library, or Jest) in the client/ directory.

Tasks:

  1. Install the necessary dev dependencies (vitest, @testing-library/react, etc.).
  2. Create the configuration file (e.g., vitest.config.ts).
  3. Add a "test": "vitest" script to client/package.json.
  4. Write a single, simple dummy test (e.g., client/src/__tests__/sample.test.ts) that asserts expect(1 + 1).toBe(2) to prove the test runner works.

Where to look


If you want to tackle this issue, comment below and I will assign it to you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions