@aws-cdk_integ-tests-alpha.Match

class Match ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.IntegTests.Alpha.Match
Gogithub.com/aws/aws-cdk-go/awscdkintegtestsalpha/v2#Match
Javasoftware.amazon.awscdk.integtests.alpha.Match
Pythonaws_cdk.integ_tests_alpha.Match
TypeScript (source)@aws-cdk/integ-tests-alpha ยป Match

Partial and special matching during assertions.

Initializer

new Match()

Methods

NameDescription
static arrayWith(pattern)๐Ÿ”นMatches the specified pattern with the array found in the same relative path of the target.
static objectLike(pattern)๐Ÿ”นMatches the specified pattern to an object found in the same relative path of the target.
static serializedJson(pattern)๐Ÿ”นMatches any string-encoded JSON and applies the specified pattern after parsing it.
static stringLikeRegexp(pattern)๐Ÿ”น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.