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(aws-cdk-lib): use ts-jest #25728

Merged
merged 24 commits into from
Aug 17, 2023
Merged

chore(aws-cdk-lib): use ts-jest #25728

merged 24 commits into from
Aug 17, 2023

Conversation

MrArnoldPalmer
Copy link
Contributor

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.

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.
@gitpod-io
Copy link

gitpod-io bot commented May 24, 2023

@github-actions github-actions bot added the p2 label May 24, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team May 24, 2023 22:04
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label May 24, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a 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.

@MrArnoldPalmer MrArnoldPalmer changed the title Chore/ts jest chore(aws-cdk-lib): use ts-jest May 24, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review May 24, 2023 22:17

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label May 24, 2023
@mrgrain mrgrain marked this pull request as draft July 20, 2023 11:08
@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2023

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-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 4, 2023
@mergify
Copy link
Contributor

mergify bot commented Aug 4, 2023

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).

@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Aug 4, 2023
@MrArnoldPalmer
Copy link
Contributor Author

Looks like this is working now? @rix0rrr was there anything else that you noticed is needed here when you were using it?

@MrArnoldPalmer MrArnoldPalmer marked this pull request as ready for review August 17, 2023 15:02
@MrArnoldPalmer MrArnoldPalmer removed the pr/do-not-merge This PR should not be merged at this time. label Aug 17, 2023
@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2023

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: b30f391
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 7cee5b3 into main Aug 17, 2023
9 checks passed
@mergify mergify bot deleted the chore/ts-jest branch August 17, 2023 21:55
@mergify
Copy link
Contributor

mergify bot commented Aug 17, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants