Created
March 8, 2019 15:22
-
-
Save panvourtsis/0bcfd3a02aefc4273beedf9591ab0073 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ActionsObservable, StateObservable } from 'redux-observable'; | |
... | |
it('expects to work perfectly', async () => { | |
const mockedResponse = {}; | |
const action$ = ActionsObservable.of(action.actionRequest()); | |
const expected = [ | |
addDataAction(mockedResponse), // action 1 | |
pushInfoSnackbar('created successfully') // action 2 | |
]; | |
mockAxios.onGet().reply(200, mockedResponse); | |
const epic = await exampleEpic(action$) | |
.pipe(toArray()) | |
.toPromise(); | |
expect(epic).toEqual(expected); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment