-
Notifications
You must be signed in to change notification settings - Fork 4k
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(assertions): an initial version of the CDK 'assert' library, now experimentally available in all supported languages #14952
Conversation
dff0f30
to
29e0dda
Compare
2766055
to
c656b29
Compare
} | ||
} | ||
|
||
function toTemplate(stack: Stack): any { |
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.
As commented in the RFC, I believe we may want to expose this method directly to support snapshot tests:
expect(Template.fromStack(stack)).toMatchSnapshot();
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.
Let's add this in, as we need it.
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.
What do you mean "as we need it"? The use case is clear and almost every construct library I've written used snapshot tests to some degree. The current assert library as "SynthUtils" which offer this api, which implies "we already need it". No?
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'll be migrating more construct libraries to use 'assertions'. This PR only migrates efs. I'll add it when I come across one.
Co-authored-by: Elad Ben-Israel <[email protected]>
* Typically used, as part of unit tests, to validate that the rendered | ||
* CloudFormation template has expected resources and properties. | ||
*/ | ||
export class TemplateAssertions { |
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.
Slight preference for Assertions
here (shorter name, easier to read and type). But I guess potato potato.
ac9763e
to
67af532
Compare
Thank you for contributing! Your pull request will be updated from master 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 |
@Mergifyio refresh |
…w experimentally available in all supported languages (aws#14952) Announcing 'assertions', the next revision of the CDK assert module. This module is built via jsii and hence is available in all CDK supported languages. Motivation and design: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0328-polyglot-assert.md
…w experimentally available in all supported languages (aws#14952) Announcing 'assertions', the next revision of the CDK assert module. This module is built via jsii and hence is available in all CDK supported languages. Motivation and design: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0328-polyglot-assert.md
Announcing 'assertions', the next revision of the CDK assert
module. This module is built via jsii and hence is available in
all CDK supported languages.
Motivation and design: https://github.com/aws/aws-cdk-rfcs/blob/master/text/0328-polyglot-assert.md
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license