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

Function setup

test/engine-fact-comparison.test.js:17–24  ·  view source on GitHub ↗
(conditions)

Source from the content-addressed store, hash-verified

15 let eventSpy
16
17 function setup (conditions) {
18 const event = { type: 'success-event' }
19 eventSpy = sandbox.spy()
20 engine = engineFactory()
21 const rule = factories.rule({ conditions, event })
22 engine.addRule(rule)
23 engine.on('success', eventSpy)
24 }
25
26 context('constant facts', () => {
27 const constantCondition = {

Callers 1

Calls 1

addRuleMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…