@@ -1594,4 +1594,68 @@ describe('getFlowValidation - Integrationstest', () => {
15941594 expect ( result . diagnostics [ 0 ] . parameterIndex ) . toBe ( null )
15951595 } ) ;
15961596
1597+ it ( '13' , ( ) => {
1598+
1599+ const flow : Flow = {
1600+ startingNodeId : "gid://sagittarius/NodeFunction/1" ,
1601+ nodes : {
1602+ nodes : [
1603+ {
1604+ id : "gid://sagittarius/NodeFunction/1" ,
1605+ functionDefinition : { identifier : "std::control::if" } ,
1606+ parameters : {
1607+ nodes : [
1608+ {
1609+ value : {
1610+ __typename : "LiteralValue" ,
1611+ value : true
1612+ }
1613+ } ,
1614+ {
1615+ value : {
1616+ __typename : "NodeFunctionIdWrapper" ,
1617+ id : "gid://sagittarius/NodeFunction/2"
1618+ }
1619+ }
1620+ ]
1621+ } ,
1622+ } ,
1623+ {
1624+ id : "gid://sagittarius/NodeFunction/2" ,
1625+ functionDefinition : { identifier : "std::number::add" } ,
1626+ parameters : {
1627+ nodes : [
1628+ { value : { __typename : "LiteralValue" , value : 0 } } ,
1629+ { value : { __typename : "LiteralValue" , value : 0 } }
1630+ ]
1631+ } ,
1632+ nextNodeId : "gid://sagittarius/NodeFunction/3" ,
1633+ } ,
1634+ {
1635+ id : "gid://sagittarius/NodeFunction/3" ,
1636+ functionDefinition : { identifier : "std::control::return" } ,
1637+ parameters : {
1638+ nodes : [
1639+ {
1640+ value : {
1641+ __typename : "ReferenceValue" ,
1642+ nodeFunctionId : "gid://sagittarius/NodeFunction/2" ,
1643+ }
1644+ }
1645+ ]
1646+ }
1647+ }
1648+ ]
1649+ }
1650+ } ;
1651+
1652+ const result = getFlowValidation ( flow , FUNCTION_SIGNATURES , DATA_TYPES ) ;
1653+
1654+ expect ( result . isValid ) . toBe ( true ) ;
1655+ result . diagnostics . forEach ( ( error ) => {
1656+ expect ( error . nodeId ) . toBeDefined ( )
1657+ expect ( error . parameterIndex ) . toBeDefined ( )
1658+ } )
1659+ } ) ;
1660+
15971661} ) ;
0 commit comments