class Match
Language | Type name |
---|---|
![]() | Amazon.CDK.IntegTests.Alpha.Match |
![]() | github.com/aws/aws-cdk-go/awscdkintegtestsalpha/v2#Match |
![]() | software.amazon.awscdk.integtests.alpha.Match |
![]() | aws_cdk.integ_tests_alpha.Match |
![]() | @aws-cdk/integ-tests-alpha ยป Match |
Partial and special matching during assertions.
Initializer
new Match()
Methods
Name | Description |
---|---|
static array | Matches the specified pattern with the array found in the same relative path of the target. |
static object | Matches the specified pattern to an object found in the same relative path of the target. |
static serialized | Matches any string-encoded JSON and applies the specified pattern after parsing it. |
static string | Matches targets according to a regular expression. |
static arrayWith(pattern)
public static arrayWith(pattern: any[]): { [string]: any[] }
Parameters
- pattern
any[]
โ the pattern to match.
Returns
{ [string]: any[] }
Matches the specified pattern with the array found in the same relative path of the target.
The set of elements (or matchers) must be in the same order as would be found.
static objectLike(pattern)
public static objectLike(pattern: { [string]: any }): { [string]: { [string]: any } }
Parameters
- pattern
{ [string]: any }
โ the pattern to match.
Returns
{ [string]: { [string]: any } }
Matches the specified pattern to an object found in the same relative path of the target.
The keys and their values (or matchers) must be present in the target but the target can be a superset.
static serializedJson(pattern)
public static serializedJson(pattern: { [string]: any }): { [string]: { [string]: any } }
Parameters
- pattern
{ [string]: any }
โ the pattern to match after parsing the encoded JSON.
Returns
{ [string]: { [string]: any } }
Matches any string-encoded JSON and applies the specified pattern after parsing it.
static stringLikeRegexp(pattern)
public static stringLikeRegexp(pattern: string): { [string]: string }
Parameters
- pattern
string
Returns
{ [string]: string }
Matches targets according to a regular expression.