File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -645,7 +645,25 @@ describe('#compileStateMachines', () => {
645
645
} ,
646
646
MessageBody : 'This is a static message' ,
647
647
} ,
648
+ Next : 'Parallel' ,
649
+ } ,
650
+ Parallel : {
651
+ Type : 'Parallel' ,
648
652
End : true ,
653
+ Branches : [
654
+ {
655
+ StartAt : 'Lambda2' ,
656
+ States : {
657
+ Lambda2 : {
658
+ Type : 'Task' ,
659
+ Resource : {
660
+ Ref : 'MyFunction2' ,
661
+ } ,
662
+ End : true ,
663
+ } ,
664
+ } ,
665
+ } ,
666
+ ] ,
649
667
} ,
650
668
} ,
651
669
} ,
@@ -684,5 +702,13 @@ describe('#compileStateMachines', () => {
684
702
expect ( sqs . Parameters . QueueUrl . startsWith ( '${' ) ) . to . eq ( true ) ;
685
703
const queueUrlParam = sqs . Parameters . QueueUrl . replace ( / [ $ { } ] / g, '' ) ;
686
704
expect ( params [ queueUrlParam ] ) . to . eql ( { Ref : 'MyQueue' } ) ;
705
+
706
+ const parallel = modifiedDefinition . States . Parallel ;
707
+ expect ( parallel . Branches ) . to . have . lengthOf ( 1 ) ;
708
+ const lambda2 = parallel . Branches [ 0 ] . States . Lambda2 ;
709
+ expect ( lambda2 . Resource . startsWith ( '${' ) ) . to . eq ( true ) ;
710
+ const functionParam2 = lambda2 . Resource . replace ( / [ $ { } ] / g, '' ) ;
711
+ expect ( params ) . to . haveOwnProperty ( functionParam2 ) ;
712
+ expect ( params [ functionParam2 ] ) . to . eql ( { Ref : 'MyFunction2' } ) ;
687
713
} ) ;
688
714
} ) ;
You can’t perform that action at this time.
0 commit comments