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

test: consolidate jest config #3069

Merged
merged 3 commits into from
Dec 13, 2024
Merged

test: consolidate jest config #3069

merged 3 commits into from
Dec 13, 2024

Conversation

dpilch
Copy link
Member

@dpilch dpilch commented Dec 12, 2024

Description of changes

Consolidate jest config by:

  • removing all jest config in package.json file in each package
  • Create a jest.config.base.js file at the root
  • Create a jest.config.js in each package in import and extend jest.config.base.js

I did not make any changes to the test config for the E2E tests (which also use jest).

CDK / CloudFormation Parameters Changed

N/A

Issue #, if available

N/A

Description of how you validated changes

Run unit tests

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dpilch dpilch marked this pull request as ready for review December 12, 2024 20:55
@dpilch dpilch requested a review from a team as a code owner December 12, 2024 20:55
@@ -33,38 +33,5 @@
"peerDependencies": {
"aws-cdk-lib": "^2.158.0",
"constructs": "^10.3.0"
},
"jest": {
Copy link
Member Author

Choose a reason for hiding this comment

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

There are no tests in this package.

@@ -290,7 +290,6 @@
"jsii-pacmak": "^1.84.0",
"jsii-rosetta": "^5.4.23",
"rimraf": "^3.0.0",
"ts-jest": "^29.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

Installed at root level, so it is not needed here or other sub-packages.

Copy link
Member Author

Choose a reason for hiding this comment

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

This config was not used because jest is started in each sub-package with lerna run test.

@dpilch dpilch enabled auto-merge (squash) December 13, 2024 18:13
@dpilch dpilch merged commit eb86867 into main Dec 13, 2024
7 checks passed
@dpilch dpilch deleted the jest-config branch December 13, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants