Skip to content

Migrate the remaining tests to vitest from jest #3949

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

Open
palisadoes opened this issue Apr 23, 2025 · 13 comments
Open

Migrate the remaining tests to vitest from jest #3949

palisadoes opened this issue Apr 23, 2025 · 13 comments
Assignees
Labels
feature request good first issue Good for newcomers no-issue-activity No issue activity test Testing application

Comments

@palisadoes
Copy link
Contributor

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

  1. We have migrated most tests from jest to vitest
  2. The work needs to be completed

Describe the solution you'd like

  1. Migrate the remaining tests to vitest from jest
  2. Remove jest from the relevant package lists
  3. All tests must be valid and pass
  4. The code coverage of your patch needs to be equal or better than that of the code base

Describe alternatives you've considered

  • N/A

Approach to be followed (optional)

  • N/A

Additional context

  • These are the files to be updated
./src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.spec.tsx:    (useLocalStorage as jest.Mock).mockReturnValue({
./src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.spec.tsx:    (cookies.get as jest.Mock).mockReturnValue('en');
./src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.spec.tsx:    (urlToFile as jest.Mock).mockResolvedValue(mockFile);
./src/components/ChangeLanguageDropdown/ChangeLanguageDropDown.spec.tsx:    (useLocalStorage as jest.Mock).mockReturnValue({
./src/components/Venues/VenueCard.spec.tsx:import '@testing-library/jest-dom';
./src/components/Advertisements/core/AdvertisementEntry/AdvertisementEntry.spec.tsx:import '@testing-library/jest-dom';
./src/components/OrgSettings/General/GeneralSettings.spec.tsx:import '@testing-library/jest-dom';
./src/screens/OrgPost/Posts.spec.tsx:import '@testing-library/jest-dom';
./src/screens/ManageTag/editModal/EditUserTagModal.spec.tsx:import '@testing-library/jest-dom';
./src/screens/OrganizationDashboard/OrganizationDashboard.spec.tsx:    (toast.error as jest.Mock).mockReset();
./src/screens/OrganizationDashboard/OrganizationDashboard.spec.tsx:    (toast.success as jest.Mock).mockReset();
./scripts/custom-test-env.js:import Environment from 'jest-environment-jsdom';
./vitest.setup.ts:import '@testing-library/jest-dom';

Potential internship candidates

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

@hustlernik
Copy link
Contributor

@palisadoes May I take this up?

@syedali237
Copy link
Contributor

@palisadoes in the past, I was the one that wrapped up the migration process on talawa-admin, so can I be assigned this issue?

@Cioppolo14
Copy link
Contributor

I have assigned this to @syedali237. @hustlernik you already have 2 issues assigned to you.

Copy link

github-actions bot commented May 2, 2025

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label May 2, 2025
@syedali237
Copy link
Contributor

will complete this by EOD

@github-actions github-actions bot removed the no-issue-activity No issue activity label May 3, 2025
Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label May 11, 2025
@Cioppolo14
Copy link
Contributor

@syedali237 Are you still working on this?

@github-actions github-actions bot removed the no-issue-activity No issue activity label May 13, 2025
@syedali237
Copy link
Contributor

@Cioppolo14 sorry for the delay, I'll raise a PR soon.

@syedali237
Copy link
Contributor

I have fixed the issue with the jest.Mock implementation. Also, I've verified that testing-library/jest-dom can remain in the project as it's fully compatible with Vitest and provides the DOM interaction utilities we need for our tests.

Image

Copy link

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label May 28, 2025
@syedali237
Copy link
Contributor

Currently busy with my GSoC project, so unassigning myself for now. Feel free to take it up. Thanks!

@palisadoes palisadoes assigned noman2002 and unassigned syedali237 May 28, 2025
@palisadoes
Copy link
Contributor Author

@noman2002 Temporarily assigning this to you

@github-actions github-actions bot removed the no-issue-activity No issue activity label May 30, 2025
Copy link

github-actions bot commented Jun 6, 2025

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

@github-actions github-actions bot added the no-issue-activity No issue activity label Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request good first issue Good for newcomers no-issue-activity No issue activity test Testing application
Projects
Status: Backlog
Development

No branches or pull requests

6 participants