-
Notifications
You must be signed in to change notification settings - Fork 456
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
feat(lib): exposed testing matchers for other languages properly #1935
Conversation
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.
Some smaller things
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.
I mostly focused on the C# and Java pieces since I'm not familiar with unit testing in Python or Go.
Really just minor points about trying to align closer with conventions of the specific languages.
// The tests below are example tests, you can find more information at | ||
// https://cdk.tf/testing | ||
public class TestProgram{ | ||
private static TerraformStack stack = new TerraformStack(Testing.app(), "stack"); |
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.
I'd probably opt for doing this in a test setup rather than a static variable.
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.
I think we can do a follow up for this one 👍
test/java/testing-matchers/test.ts
Outdated
"src/main/java/com/mycompany/app/JunitTesting.java" | ||
); | ||
await driver.copyFiles("update-pom.sh"); | ||
await driver.exec("bash update-pom.sh"); |
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.
Why not just copy an updated pom file?
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.
I think this is something we can do in a follow up PR
The problem I see with delaying changes is that we are likely to encounter breaking changes or further suboptimal experience when adding in the future. |
Co-authored-by: Jon Steinich <[email protected]>
Co-authored-by: Jon Steinich <[email protected]>
Co-authored-by: Jon Steinich <[email protected]>
Outdate and we can improve the docs even after the release, so not blocking :)
384b718
to
dacb81c
Compare
* fix(lib): exposed testing matchers for other languages properly * added documentation for increased support of unit testing * updated templates to add testing and various small changes to integration tests * fixed docs formating * Update website/docs/cdktf/test/unit-tests.mdx Co-authored-by: Laura Pacilio <[email protected]> * Update website/docs/cdktf/test/unit-tests.mdx Co-authored-by: Laura Pacilio <[email protected]> * Update website/docs/cdktf/test/unit-tests.mdx Co-authored-by: Laura Pacilio <[email protected]> * Update website/docs/cdktf/test/unit-tests.mdx Co-authored-by: Laura Pacilio <[email protected]> * Revert "Update website/docs/cdktf/test/unit-tests.mdx" This reverts commit 1258245. * Revert "Update website/docs/cdktf/test/unit-tests.mdx" This reverts commit a9cc009. * fixed templates that caused build errors in tests * update to testing docs * fixed async tests for java dotnet * chore: fix wording Co-authored-by: Jon Steinich <[email protected]> * chore: improve wording Co-authored-by: Jon Steinich <[email protected]> * chore: fix wording Co-authored-by: Jon Steinich <[email protected]> * chore: use default test path in java * chore: only expose boolean instead of AssertionReturn for now Co-authored-by: Laura Pacilio <[email protected]> Co-authored-by: Daniel Schmidt <[email protected]> Co-authored-by: Jon Steinich <[email protected]>
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Testing matchers placed in class for jsii exposure