You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { ActionsObservable } from 'redux-observable';
import * as authActionTypes from '../authTypes';
import { facebookLoginEpic } from '../authEpics';
it('Should return the fetchUserSuccess and saveUserInfoSuccess actions', () => {
const action$ = ActionsObservable.of({
type: authActionTypes.FACEBOOK_LOGIN_INIT,
});
const output$ = facebookLoginEpic(action$);
console.log(output$)
});
I'm trying to log the output$, but always get the error
xxxxxxx/node_modules/rxjs/internal/util/hostReportError.js:4
setTimeout(function () { throw err; });
^
TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
at Object.<anonymous>.exports.subscribeTo (/Users/rae/Project/partido/node_modules/rxjs/internal/util/subscribeTo.js:42:15)
at Object.subscribeToResult (/Users/rae/Project/partido/node_modules/rxjs/internal/util/subscribeToResult.js:10:26)
at CatchSubscriber.Object.<anonymous>.CatchSubscriber.error (/Users/rae/Project/partido/node_modules/rxjs/internal/operators/catchError.js:57:33)
at MergeMapSubscriber.Object.<anonymous>.Subscriber._error (/Users/rae/Project/partido/node_modules/rxjs/internal/Subscriber.js:96:26)
at MergeMapSubscriber.Object.<anonymous>.Subscriber.error (/Users/rae/Project/partido/node_modules/rxjs/internal/Subscriber.js:74:18)
at /Users/rae/Project/partido/node_modules/rxjs/internal/util/subscribeToPromise.js:10:43
at tryCallOne (/Users/rae/Project/partido/node_modules/promise/lib/core.js:37:12)
at /Users/rae/Project/partido/node_modules/promise/lib/core.js:123:15
at flush (/Users/rae/Project/partido/node_modules/asap/raw.js:50:29)
at process._tickCallback (internal/process/next_tick.js:172:11)
error Command failed with exit code 1.
Is there anything I did wrong in my test or epic?
The text was updated successfully, but these errors were encountered:
I'm trying to write unit test for following epic
test.js
I'm trying to log the output$, but always get the error
Is there anything I did wrong in my test or epic?
The text was updated successfully, but these errors were encountered: