fix(core): update
This commit is contained in:
@@ -12,12 +12,12 @@ tap.test('first test', async () => {
|
||||
testSmartruleInstance = new smartrule.SmartRule<ITestMessage>();
|
||||
testSmartruleInstance.createRule(
|
||||
2,
|
||||
async messageArg => {
|
||||
async (messageArg) => {
|
||||
if (messageArg.body.startsWith('hello')) {
|
||||
return 'apply-stop';
|
||||
}
|
||||
},
|
||||
async messageArg => {
|
||||
async (messageArg) => {
|
||||
console.log(`rule triggered for message with body ${messageArg.body}`);
|
||||
}
|
||||
);
|
||||
@@ -26,7 +26,7 @@ tap.test('first test', async () => {
|
||||
tap.test('make a decision based on an object', async () => {
|
||||
testSmartruleInstance.makeDecision({
|
||||
id: '123456',
|
||||
body: 'hello, there. This is a cool message!'
|
||||
body: 'hello, there. This is a cool message!',
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user