-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(assertions): assertion inversion #15868
Copy link
Copy link
Closed as not planned
Labels
@aws-cdk/assertionsRelated to the @aws-cdk/assertv2 packageRelated to the @aws-cdk/assertv2 packageeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Provide the ability to invert the list of assertions - hasResource(), hasResourceProperties(), etc. - to be inverted or negated, i.e., "does not have resource", "does not have resource with properties", etc.
See #15857 (comment)
Alternatively, the current experience of the following against a template that has no "Foo::Bar" resource will fail with the error "No resource matching Foo::Bar".
hasResourceProperties('Foo::Bar', Match.not({
Baz: 'Qux'
}));This needs to be fixed.
This is a 🚀 Feature Request
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/assertionsRelated to the @aws-cdk/assertv2 packageRelated to the @aws-cdk/assertv2 packageeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2