How to use the redux-observable/lib/cjs/ActionsObservable.ActionsObservable function in redux-observable

To help you get started, we’ve selected a few redux-observable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github root-systems / feathers-action / test / epic.js View on Github external
test('find with cancel', function (t) {
  const cid = createCid()
  const action$ = new Action$(Rx.Observable.create(observer => {
    observer.next(cats.actions.find(cid))
    process.nextTick(() => {
      observer.next(cats.actions.complete(cid))
    })
  }))
  const feathers = {
    find: () => Rx.Observable.create(observer => {
      observer.next(values(catsData))
    })
  }
  const expected = [
    actionCreators.start(cid, { service, method: 'find', args: { params: {} } }),
    actionCreators.set(cid, 0, catsData[0]),
    actionCreators.set(cid, 1, catsData[1]),
    actionCreators.set(cid, 2, catsData[2])
  ]