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/utils/useSession.test.tsx from Jest to Vitest #2754

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

Refactor: src/utils/useSession.test.tsx from Jest to Vitest #2754

palisadoes opened this issue Dec 24, 2024 · 3 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

@github-actions github-actions bot added documentation Improvements or additions to documentation refactor Refactor the code to improve its quality test Testing application unapproved labels Dec 24, 2024
@palisadoes palisadoes added good first issue Good for newcomers and removed documentation Improvements or additions to documentation feature request labels Dec 24, 2024
@vivekbisen04
Copy link

@palisadoes I would like to work on issue #2754 to migrate useSession.test.tsx from Jest to Vitest.

I understand this requires:

  • Converting Jest tests to Vitest equivalents
  • Maintaining 100% test coverage
  • Following the project's migration standards

I've reviewed the base Vitest config PR and documentation.

May I be assigned to this task?

@palisadoes
Copy link
Contributor Author

We have a policy of unassigning contributors who close PRs without getting validation from our reviewer team. This is because:

  1. We start looking for people to review PRs when you submit them.
  2. We often contact them and link to the PR. If the PR is closed the whole effort is wasted.
  3. The historical thread of reviewer comments is broken when the work is spread across multiple PRs. The quality of our code is affected negatively.

Please be considerate of our volunteers' limited time and our desire to improve our code base.

This policy is stated as a pinned post in all our Talawa repositories. Our YouTube videos explain why this practice is not acceptable to our Community.

In most cases you don’t have to close the PR to trigger the GitHub workflow to run again. Making a new commit and pushing it to your GitHub account will normally be sufficient.

Unfortunately, if this continues we will have to close the offending PR and unassign you from the issue.

  • This can be seen here
    image
  • And here too
    image

@vivekbisen04
Copy link

vivekbisen04 commented Dec 28, 2024 via email

@github-project-automation github-project-automation bot moved this from Backlog to Done in Talawa-Admin (Tests) Dec 28, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Talawa Admin - Refactoring Dec 28, 2024
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
Archived in project
Development

No branches or pull requests

2 participants