-
Notifications
You must be signed in to change notification settings - Fork 148
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
test(maintenance): switch tracer to vitest #3285
Conversation
Integration tests passing on this branch: https://github.com/aws-powertools/powertools-lambda-typescript/actions/runs/11669742574/job/32492395223 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I have only few questions for clarification and we are good to merge.
@am29d thanks for the review, addressed your comments & ready for another round. |
|
Summary
Changes
This PR moves the unit and end to end tests for the Tracer package to use vitest as test runner.
This action is part of the ongoing migration from Jest to Vitest, and the vast majority of the changes in the tests focus on changing the imports and using Vitest-specific APIs.
The file with most changes is the
packages/tracer/tests/unit/Provider.test.ts
, which has a module import mock for theaws-xray-sdk-node
package. Because Jest and Vitest mock imports slightly differently, I had to make more changes in this file than in others.I also have removed some redundant test cases while maintaining the same level of coverage.
Two extra files from other packages were touched, respectively for:
setupEnv.ts
underpackages/testing
was modified to include two environment variables needed for Tracer during tests.Issue number: closes #3284
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.