Version
4.8.0
Describe the bug
In core/src/sagas/effects/observeOnce.js, the call pattern for Observable.subscribe is using older format (RxJS) instead of ES Observable.
The new signature is being used in observeEach.js.
This is causing test running in Jest not able to subscribe to the value correct.
The correct one is:
- subscription = observable.subscribe(resolve, reject, resolve);
+ subscription = observable.subscribe({
+ complete: resolve,
+ error: reject,
+ next: resolve
+ })
Steps to reproduce
- Write a test using Jest to call
DIRECT_LINE/POST_ACTIVITY, and expect DIRECT_LINE/POST_ACTIVITY_FULFILLED
Expected behavior
The POST_ACTIVITY_FULFILLED action should be dispatched back.
Instead, since observeOnce is not working under Jest + Node.js and failed silently, the DIRECT_LINE/POST_ACTIVITY_FULFILLED is never dispatched. Instead, it dispatched POST_ACTIVITY_REJECTED.
Additional context
Tagging @youyu16.
[Bug]
Version
4.8.0Describe the bug
In
core/src/sagas/effects/observeOnce.js, the call pattern forObservable.subscribeis using older format (RxJS) instead of ES Observable.The new signature is being used in
observeEach.js.This is causing test running in Jest not able to subscribe to the value correct.
The correct one is:
Steps to reproduce
DIRECT_LINE/POST_ACTIVITY, and expectDIRECT_LINE/POST_ACTIVITY_FULFILLEDExpected behavior
The
POST_ACTIVITY_FULFILLEDaction should be dispatched back.Instead, since
observeOnceis not working under Jest + Node.js and failed silently, theDIRECT_LINE/POST_ACTIVITY_FULFILLEDis never dispatched. Instead, it dispatchedPOST_ACTIVITY_REJECTED.Additional context
Tagging @youyu16.
[Bug]