-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(assertions): matcher support for
templateMatches()
API (#16789)
The `templateMatches()` API behaved differently from the rest of the `hasXxx()` and `findXxx()` APIs in that it did not accept a Matcher. This functionality is generally useful to perform partial matching on the full template. Further, users can get confused and assume that the `templateMatches()` API do support Matchers, as this is the only one that is an exception. Align this API with the rest of the module's behaviour. A nice side effect of this is that this module no longer needs to vendor in changes from the 'assert' module and brings this in line with the other modules in this repo. nozem can work again! 🙌 BREAKING CHANGE: The `templateMatches()` API previously performed an exact match. The default behavior has been updated to be "object-like". ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Niranjan Jayakar
authored
Oct 5, 2021
1 parent
1deea90
commit 0fb2179
Showing
11 changed files
with
92 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Partial types for CloudFormation Template | ||
|
||
export type Template = { | ||
Resources: { [logicalId: string]: Resource }, | ||
Outputs: { [logicalId: string]: Output }, | ||
Mappings: { [logicalId: string]: Mapping } | ||
} | ||
|
||
export type Resource = { | ||
Type: string; | ||
[key: string]: any; | ||
} | ||
|
||
export type Output = { [key: string]: any }; | ||
|
||
export type Mapping = { [key: string]: any }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.