node-nikita icon indicating copy to clipboard operation
node-nikita copied to clipboard

engine: fix bug in conditions

Open sergkudinov opened this issue 4 years ago • 0 comments

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' ]

sergkudinov avatar Jan 21 '21 10:01 sergkudinov