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/components/OrgSettings/ActionItemCategories/* from Jest to Vitest #2795

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

Comments

@palisadoes
Copy link
Contributor

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/OrgSettings/ActionItemCategories/CategoryModal.test.tsx from Jest to Vitest
  2. Refactor src/components/OrgSettings/ActionItemCategories/OrgActionItemCategories.test.tsx from Jest to Vitest
  3. Refactor src/components/OrgSettings/AgendaItemCategories/AgendaCategoryCreateModal.test.tsx from Jest to Vitest
  4. Refactor src/components/OrgSettings/AgendaItemCategories/AgendaCategoryUpdateModal.test.tsx from Jest to Vitest
  5. Refactor src/components/OrgSettings/AgendaItemCategories/OrganizationAgendaCategory.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

@github-actions github-actions bot added documentation Improvements or additions to documentation parent Parent issue 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 parent Parent issue feature request labels Dec 24, 2024
@abbi4code
Copy link
Contributor

can i work on this issue ? @palisadoes

@abbi4code
Copy link
Contributor

In the src/components/Orgsettings/General file, there are three more tests that can be refactored to Vitest. Should they also be included in the PR?

@palisadoes
Copy link
Contributor Author

Yes

@shivasankaran18
Copy link
Contributor

can I work on this issue..? @palisadoes

@abbi4code
Copy link
Contributor

I have already started working on this and will raise a PR soon.

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 unapproved
Projects
Status: Done
Archived in project
Development

No branches or pull requests

3 participants