-
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(assert): add countResourcesLike method #6168
feat(assert): add countResourcesLike method #6168
Conversation
Adds a method to get a count of Stack resources filtered by Type (i.e. `"AWS::ApiGateway::Method"`) as well as properties (i.e. `{ resourceId: "MyResource01234" }`)
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
Looks good. Can you please update README?
Adds documentation for `countResources` and `countResourcesLike` methods
@eladb Added documentation for |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request is now being automatically merged. |
Adds a method to assert against an expected count of Stack resources filtered by Type (i.e.
"AWS::ApiGateway::Method"
) as well as properties (i.e.{ resourceId: "MyResource01234" }
) - similar to existinghaveResource
vs.haveResourceLike
methods.Addresses feature request #6132
🗒 Filtering by properties uses quick-and-dirty
JSON.stringify
comparison of each key of provided props object & a resource'sProperties
object, so the expected caveats regarding nested object inequality (differently-ordered properties, incomplete properties) apply here (and have corresponding tests).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license