()
| 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 | }) |
no outgoing calls
no test coverage detected
searching dependent graphs…