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
I correctly understand the testing Effects. Nevertheless, I encounter an error when I try to test a Http Failed mocked.
Is that possible to add a fail test case?
I encounter this kind of error: Error: Expected $[1].frame = 0 to equal 10.
the test case:
it('should return GetFailedAction action, with the errror, on fail', async () => {
const { effects, TodoService, actions$ } = setup()
const action = new GetAction()
const errorMsg = {message: 'Error: an error 40X occured'}
const expectedResult = new GetFailedAction(errorMsg.message)
// mock this function which we can test later on, due to the promise issue
spyOn(effects, 'getTodo').and.returnValue(Observable.throw(errorMsg))
actions$.stream = hot('a|', { a: action });
const expected = cold('b|', { b: expectedResult })
expect(effects.getTodo$).toBeObservable(expected)
// expect(effects.getTodo).toHaveBeenCalled()
})
The text was updated successfully, but these errors were encountered:
Hi there,
I correctly understand the testing Effects. Nevertheless, I encounter an error when I try to test a Http Failed mocked.
Is that possible to add a fail test case?
I encounter this kind of error:
Error: Expected $[1].frame = 0 to equal 10.
the test case:
The text was updated successfully, but these errors were encountered: