interface MatchFailure
Language | Type name |
---|---|
![]() | Amazon.CDK.Assertions.MatchFailure |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/assertions#MatchFailure |
![]() | software.amazon.awscdk.assertions.MatchFailure |
![]() | aws_cdk.assertions.MatchFailure |
![]() | aws-cdk-lib » assertions » MatchFailure |
Match failure details.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { assertions } from 'aws-cdk-lib';
declare const matcher: assertions.Matcher;
const matchFailure: assertions.MatchFailure = {
matcher: matcher,
message: 'message',
path: ['path'],
// the properties below are optional
cost: 123,
};
Properties
Name | Type | Description |
---|---|---|
matcher | Matcher | The matcher that had the failure. |
message | string | Failure message. |
path | string[] | The relative path in the target where the failure occurred. |
cost? | number | The cost of this particular mismatch. |
matcher
Type:
Matcher
The matcher that had the failure.
message
Type:
string
Failure message.
path
Type:
string[]
The relative path in the target where the failure occurred.
If the failure occurred at root of the match tree, set the path to an empty list.
If it occurs in the 5th index of an array nested within the 'foo' key of an object,
set the path as ['/foo', '[5]']
.
cost?
Type:
number
(optional, default: 1)
The cost of this particular mismatch.