diff --git a/__tests__/traverse.test.js b/__tests__/traverse.test.js index b137b3c83..c12370477 100644 --- a/__tests__/traverse.test.js +++ b/__tests__/traverse.test.js @@ -61,3 +61,14 @@ describe('analyseSituation on raw rules', function() { */ }); + +describe('analyseSituation with mecanisms', function() { + + it('should handle n-way "or"', function() { + let rawRules = [ + {nom: "startHere", formule: {"une de ces conditions": ["1 > 2", "1 > 0", "0 > 2"]}}], + rules = rawRules.map(enrichRule) + expect(analyseSituation(rules,"startHere")(stateSelector)).to.have.property('nodeValue',true) + }); + +}); diff --git a/source/engine/traverse.js b/source/engine/traverse.js index 4af2ed410..e6a0ff37d 100644 --- a/source/engine/traverse.js +++ b/source/engine/traverse.js @@ -286,7 +286,7 @@ let treat = (situationGate, rules, rule) => rawNode => { value={result.nodeValue} child={