1 Answer
- Newest
- Most votes
- Most comments
0
Hello! This Fine-grained assertions section (at the bottom of that section there is a Step Function example) may be of help that makes use of the assertions module. In particular for Step Function definitions, the Match.serializedJson() matcher might be useful. In theory that could help you assert your Tasks are transitioning or chaining as expected.
Another approach using the Matching lib could be something like the following (Typescript snippet example)
...
it('Get Current Weather should transition to "Is it Hot?", () => {
const GET_WEATHER= 'Get Current Weather'
const IS_IT_HOT = "Is it Hot?"
template.hasResourceProperties('AWS::StepFunctions::StateMachine', {
DefinitionString: {
'Fn::Join': [
'',
Match.arrayWith([
Match.stringLikeRegexp(
`("${GET_WEATHER}":{"Next":"${IS_IT_HOT}").*`,
),
]),
],
},
});
});
...
Hope this gives you some ideas!
answered 3 days ago
Relevant content
- asked 3 months ago
- asked a month ago
- asked a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago