node-nikita
node-nikita copied to clipboard
engine: fix bug in conditions
Each condition deletes parent action what calls nikita:session:resolved
hook of the root action.
To reproduce
Run test on engine-conditions branch :
git checkout engine-conditions
cd packages/core
npx mocha test/actions/log/cli.coffee
Error:
1) actions.log.cli
session events
when resolved with conditions (local):
AssertionError: expected Array [
'localhost ♥\n',
'localhost ♥\n',
'localhost ♥\n',
'localhost ✘\n',
'localhost ♥\n',
'localhost ✘\n',
'localhost h1 : h2 ✔\n',
'localhost h1 ✔\n',
'localhost ♥\n'
] to equal Array [ 'localhost h1 ✔\n', 'localhost ♥\n' ]