(assertions): add hasParameters()
and findParameters()
API
#16720
Labels
@aws-cdk/assertions
Related to the @aws-cdk/assertv2 package
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
There should be a way to access the Parameters of the template natively with the assertions library.
Use Case
aws-cdk/packages/@aws-cdk/aws-autoscaling/test/scheduled-action.test.ts
Line 61 in 7fbf092
There are quite a few lines of code in the above example so I did not quote it all. But the idea is that if you want to assert on any parameters along with the properties, you can only use
Template.fromStack(stack).templateMatches()
which then requires you to provide the entire template. This is excess code if the user does not need to assert that the entire template is a 1-1 match.Proposed Solution
APIs similar to what is available for
hasMapping()
,hasResource()
, andhasOutput()
. Should also havefindParameters()
as well.Other
Workaround is:
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: