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/convertToBase64.test.ts from Jest to Vitest #2759

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

Refactor: src/utils/convertToBase64.test.ts from Jest to Vitest #2759

palisadoes opened this issue Dec 24, 2024 · 4 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
@raggettii
Copy link
Contributor

@palisadoes, please assign it to me

@palisadoes
Copy link
Contributor Author

@palisadoes, please assign it to me

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.

@AceHunterr
Copy link
Contributor

@palisadoes please assign this issue to me

@Dhiren-Mhatre
Copy link
Contributor

@palisadoes I would like to request assignment for this issue. Here's how I plan to handle the migration from Jest to Vitest:

  1. I will first analyze the existing convertToBase64.test.ts file to identify all Jest-specific syntax and functionality that needs to be updated.

  2. My migration approach will include:

    • Renaming the file to convertToBase64.spec.ts
    • Converting Jest test syntax to Vitest equivalents
    • Ensuring all mocks and test utilities are updated to use Vitest
    • Running the test suite to verify all tests pass
    • Verifying 100% test coverage is maintained
  3. I will follow the existing Vitest configuration from PR feat!: Migrate Testing Framework from Jest to Vitest #2457 and refer to the official Vitest documentation for best practices.

  4. I will include test coverage screenshots in my PR to demonstrate maintained coverage levels.

I'm familiar with both Jest and Vitest testing frameworks and am confident I can complete this migration while maintaining test quality and coverage.

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

4 participants