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

Unit Tests: Use Synth than SynthScope in typescript test #2755

Closed
1 task done
tolluset opened this issue Apr 2, 2023 · 2 comments · Fixed by #2756
Closed
1 task done

Unit Tests: Use Synth than SynthScope in typescript test #2755

tolluset opened this issue Apr 2, 2023 · 2 comments · Fixed by #2756
Labels
documentation Improvements or additions to documentation size/medium estimated < 1 week testing

Comments

@tolluset
Copy link
Contributor

tolluset commented Apr 2, 2023

Description

In docs recommend the test by using SynthScopre. But, it's hard to recognize the intent. Because SynthScope got a parameter of Constructs, I think this Is not natural. Most users watch this doc to learn unit tests of CDKTF, at that time they want to test their Stack, not the Constructs

Maybe docs showing using test by Synth, it can be more kindness for beginner.

ref:

Unit testing - toHaveResource() - found no resources instead
#1506

Unit testing failing to find resources for azurerm provider
#1850

Links

https://developer.hashicorp.com/terraform/cdktf/test/unit-tests#write-assertions

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@tolluset tolluset added documentation Improvements or additions to documentation new Un-triaged issue labels Apr 2, 2023
@tolluset tolluset changed the title Unit Tests: Use Synth then SynthScope in typescript test Unit Tests: Use Synth than SynthScope in typescript test Apr 2, 2023
tolluset added a commit to tolluset/terraform-cdk that referenced this issue Apr 2, 2023
tolluset added a commit to tolluset/terraform-cdk that referenced this issue Apr 2, 2023
@tolluset
Copy link
Contributor Author

tolluset commented Apr 2, 2023

I made PR #2756. For those who got in trouble on that page like me. 😿

tolluset added a commit to tolluset/terraform-cdk that referenced this issue Apr 6, 2023
@DanielMSchmidt DanielMSchmidt added testing size/medium estimated < 1 week and removed new Un-triaged issue labels Apr 13, 2023
tolluset added a commit to tolluset/terraform-cdk that referenced this issue Apr 15, 2023
mutahhir pushed a commit to tolluset/terraform-cdk that referenced this issue Apr 18, 2023
ansgarm added a commit that referenced this issue Apr 18, 2023
chore(docs): change to `synth` from `synthScope` for #2755
@github-actions
Copy link
Contributor

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation size/medium estimated < 1 week testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants