Closed cdoublev closed 5 years ago
@cdoublev can you install the beta release and check if it works for you?
$ npm install folktale@next
Yes, my own (rejection) tests stay green (without yelling about uncaught errors) after updating with @next
and reverting all waitAll
or and()
usages from .apply()
. Thank you for fixing/completing my tests. It perfectly answers my question asked in this comment. 👍
Task.fromNodeBack
currently doesn't prevent resolving|rejecting when the task is cancelled.Steps to reproduce
Given:
This works:
And this don't:
Expected behaviour
Last example shouldn't throw an error (
Task.fromNodeback
should check if task is already cancelled).Observed behaviour
The error Only pending deferreds can be ' + description + ', this deferred is already ' + description + '.' is thrown.
Environment
Additional information
Related issue (comment): https://github.com/origamitower/folktale/issues/153#issuecomment-453110251 Related file: https://github.com/origamitower/folktale/blob/master/packages/base/source/conversions/nodeback-to-task.js#L25