(replaceFactsInEventParams, event = eventWithFact)
| 312 | const expectedEvent = { type: 'countedEnough', params: { count: 5 } } |
| 313 | |
| 314 | function setup (replaceFactsInEventParams, event = eventWithFact) { |
| 315 | const conditions = { |
| 316 | any: [ |
| 317 | { |
| 318 | fact: 'success', |
| 319 | operator: 'equal', |
| 320 | value: true |
| 321 | } |
| 322 | ] |
| 323 | } |
| 324 | |
| 325 | const ruleOptions = { conditions, event, priority: 100 } |
| 326 | const countedEnoughRule = factories.rule(ruleOptions) |
| 327 | engine = engineFactory([countedEnoughRule], { |
| 328 | replaceFactsInEventParams |
| 329 | }) |
| 330 | } |
| 331 | context('without flag', () => { |
| 332 | beforeEach(() => setup(false)) |
| 333 | it('"success" passes the event without resolved facts', async () => { |
no outgoing calls
no test coverage detected
searching dependent graphs…