Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: src/setupTests.ts from Jest to Vitest #2753

Closed
palisadoes opened this issue Dec 24, 2024 · 8 comments
Closed

Refactor: src/setupTests.ts from Jest to Vitest #2753

palisadoes opened this issue Dec 24, 2024 · 8 comments
Assignees
Labels
good first issue Good for newcomers refactor Refactor the code to improve its quality test Testing application

Comments

@palisadoes
Copy link
Contributor

palisadoes commented Dec 24, 2024

Is your feature request related to a problem? Please describe.
This file is currently tested using Jest. As part of our migration to Vitest, we need to refactor this file's test cases to align with Vitest's syntax and features.

Acceptance Criteria

  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

@palisadoes palisadoes added feature request test Testing application labels Dec 24, 2024
@github-actions github-actions bot added documentation Improvements or additions to documentation refactor Refactor the code to improve its quality unapproved labels Dec 24, 2024
@palisadoes palisadoes removed documentation Improvements or additions to documentation feature request labels Dec 24, 2024
@AQIB-NAWAB
Copy link

Hy @palisadoes , can you assign this issue to me ?

@gurramkarthiknetha
Copy link
Contributor

If no one is currently working on this issue, I would like to take it on. Please assign it to me.

@amaan-aly246
Copy link
Contributor

@Cioppolo14 If there is no activity on this issue, I would be happy to work on it.
Thanks

@Cioppolo14
Copy link
Contributor

@amaan-aly246 I just assigned you 2 issues, so you now have reached your limit. Our policy is to assign no more than two issues to each contributor across all repositories. This way everyone gets a chance to participate in the projects. We sometimes give exceptions for more urgent cases and sometimes we lose track, but the policy stands. You have reached your limit, please wait until your existing issues are closed before requesting more issues. You could unassign yourself from one of the other issues too.

@AQIB-NAWAB AQIB-NAWAB removed their assignment Jan 9, 2025
@AQIB-NAWAB
Copy link

After refactoring the file, all Jest test cases will fail, while all Vitest test cases will pass successfully.

@NishantSinghhhhh
Copy link
Contributor

@palisadoes , can I be assigned this issue , i want to work on this one

@palisadoes
Copy link
Contributor Author

Should this be closed now?

@NishantSinghhhhh
Copy link
Contributor

Yes @palisadoes

@github-project-automation github-project-automation bot moved this from Backlog to Done in Talawa Admin - Refactoring Jan 10, 2025
@github-project-automation github-project-automation bot moved this from Backlog to Done in Talawa-Admin (Tests) Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor Refactor the code to improve its quality test Testing application
Projects
Status: Done
Status: Done
Development

No branches or pull requests

6 participants