-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(aws-cdk-lib): use ts-jest #25728
Conversation
Switch to using ts-jest for unit tests in `aws-cdk-lib` instead of requiring all tests to be compiled. This lets us ignore test files when building which speeds up the build marginally, and allows for better integration with various tools, such as IDE plugins for jest so you can run individual tests without rebuilding. The workflow I have been using is running `jest --watch` either for all tests or only the directory or individual test I'm working on. When running all tests, the watch mode can be set to only rerun failed tests on change, which makes iterating on failures across multiple modules much easier.
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This reverts commit 14a0d6d.
Looks like this is working now? @rix0rrr was there anything else that you noticed is needed here when you were using it? |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Switch to using ts-jest for unit tests in
aws-cdk-lib
instead of requiring all tests to be compiled. This lets us ignore test files when building which speeds up the build marginally, and allows for better integration with various tools, such as IDE plugins for jest so you can run individual tests without rebuilding.The workflow I have been using is running
jest --watch
either for all tests or only the directory or individual test I'm working on. When running all tests, the watch mode can be set to only rerun failed tests on change, which makes iterating on failures across multiple modules much easier.