MCPcopy
hub / github.com/CacheControl/json-rules-engine / complexCondition

Function complexCondition

test/condition.test.js:340–369  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

338
339 describe('complex conditions', () => {
340 function complexCondition () {
341 return {
342 all: [
343 {
344 fact: 'age',
345 operator: 'lessThan',
346 value: 45
347 },
348 {
349 fact: 'pointBalance',
350 operator: 'greaterThanInclusive',
351 value: 1000
352 },
353 {
354 any: [
355 {
356 fact: 'gender',
357 operator: 'equal',
358 value: 'female'
359 },
360 {
361 fact: 'income',
362 operator: 'greaterThanInclusive',
363 value: 50000
364 }
365 ]
366 }
367 ]
368 }
369 }
370 it('recursively parses nested conditions', () => {
371 expect(() => new Condition(complexCondition())).to.not.throw()
372 })

Callers 1

condition.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…