We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beware that if you are testing an error or warning condition of your node behavior then currently input handler doesn't get called while unit testing.
So assuming this code:
// somewhere in FooNode constructor this.on('input', msg => { if (msg.omg) { this.error('lolwtf'); } // ..etc.. });
This wouldn't work:
describe('if `omg` in input message', function () { it('should call `error` with "lolwtf" ', function (done) { const flow = { name: 'n1', /* ..etc.. */ }; helper.load(FooNode, flow, function () { const n1 = helper.getNode('n1') n1.receive({omg: true}); n1.on('input', () => { n1.warn.should.be.calledWithExactly('lolwtf'); done(); }); }); }); });
It would just result in timeout. Here is reported issue
The text was updated successfully, but these errors were encountered:
ttoktassynov
Successfully merging a pull request may close this issue.
Beware that if you are testing an error or warning condition of your node behavior then currently input handler doesn't get called while unit testing.
So assuming this code:
This wouldn't work:
It would just result in timeout.
Here is reported issue
The text was updated successfully, but these errors were encountered: