Skip to content

Refactor src/components/EventStats/* from Jest to Vitest #2794

Closed
@palisadoes

Description

@palisadoes

Is your feature request related to a problem? Please describe.

This files in this directory and all its subdirectories are currently tested using Jest. As part of our migration to Vitest, we need to refactor all these files' test cases to align with Vitest's syntax and features.

Files:

  1. Refactor src/components/EventStats/EventStats.test.tsx from Jest to Vitest
  2. Refactor src/components/EventStats/EventStatsWrapper.test.tsx from Jest to Vitest
  3. Refactor src/components/EventStats/Statistics/AverageRating.test.tsx from Jest to Vitest
  4. Refactor src/components/EventStats/Statistics/Feedback.test.tsx from Jest to Vitest
  5. Refactor src/components/EventStats/Statistics/Review.test.tsx from Jest to Vitest

Acceptance Criteria

For each *.test.ts and *.test.tsx file found under the parent:

  1. Replace Jest-specific functions and mocks with Vitest equivalents
  2. Rename the test file from having a .test.* suffix to a .spec.* suffix
  3. Ensure all tests in the file pass after migration using npm run test:vitest
  4. Maintain the test coverage for the file as 100% after migration
  5. Upload a video or photo for this specific file coverage is 100% in the PR description

Additional context

Potential internship candidates

Please read this if you are planning to apply for a Palisadoes Foundation internship

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomersrefactorRefactor the code to improve its qualitytestTesting application

Type

No type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions