How to test race condition of a redux observable epic
问题 I have a use case where I need to cancel an Ajax call and do something else in an epic. There's an example in the redux-observable doc which fits my need exactly. However, when I try to test the racing condition in my epic, the "cancelation" doesn't seem to work. The example code is like: import { ajax } from 'rxjs/ajax'; const fetchUserEpic = action$ => action$.pipe( ofType(FETCH_USER), mergeMap(action => race( ajax.getJSON(`/api/users/${action.payload}`).pipe( map(response =>