score:5

Accepted answer
// expecting that saga waits for EXAMPLE_SAGA action
expect(saga.next().value).to.deep.equal(take('EXAMPLE_SAGA'))

// pushing EXAMPLE_SAGA action and expecting that saga waits for ANOTHER_ACTION
expect(saga.next().value).to.deep.equal(take('ANOTHER_ACTION'))

// pushing ANOTHER_ACTION and expecting that saga waits for THIRD_TAKE action
expect(saga.next({
  type: 'ANOTHER_ACTION',
  value: 'amazing'
}).value).to.deep.equal(take('THIRD_TAKE'))

Related Query

More Query from same tag