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

chore: replace jest with vitest in backend project #2191

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

marcellmueller
Copy link
Collaborator

@marcellmueller marcellmueller commented Dec 2, 2024

Description

Besides Vitest being easier to config and more modern than Jest it's a good idea to use Vitest in both the backend and frontend projects for consistency.

Testing this PR

Ensure the testing scripts are working correctly still

cd backend
npm install
npm run test
npm run test:cov
npm run test:e2e

Sonar reporter

I had removed the library jest-sonar-reporter and added vitest-sonar-reporter.

I think this is setup correctly though not 100% sure. Running the tests with jest would create backend/test-report.xml so I configured Vitest to output the same test report file. Let me know if there is something I missed here, though I set the reporter to only run in GitHub actions - see vitest.config.mts.


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

Copy link
Member

@DerekRoberts DerekRoberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thanks a bunch. :)

@marcellmueller marcellmueller marked this pull request as ready for review December 2, 2024 23:56
@marcellmueller marcellmueller changed the title Replace Jest with Vitest in backend project chore: replace jest with vitest in backend project Dec 2, 2024
@marcellmueller
Copy link
Collaborator Author

This is great! Thanks a bunch. :)

Thanks for the quick review! I will get to eslint later this week :)

@marcellmueller marcellmueller merged commit 227a8cb into main Dec 2, 2024
33 of 34 checks passed
@marcellmueller marcellmueller deleted the backend/vitest branch December 2, 2024 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants