chore: replace jest with vitest in backend project #2191
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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 - seevitest.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: