1

I'm sure it is a newbie mistake, but I am surprised that the expectSaga() test below times out. -- advice appreciated!

import { expectSaga, testSaga } from 'redux-saga-test-plan';

function* saga() {}

// ✅ ...this passes
it('should be testable with testSaga()', () => {
  testSaga(saga).next().isDone();
});

// ❌ ...this times out
it('should be testable with expectSaga()', () => {
  return expectSaga(saga).run();
});
  • redux-saga-test-plan@4.0.4
  • redux-saga@1.1.3
  • react 17
  • jest@27.5.1
  • typescript@4.6.3
Lin Du
  • 88,126
  • 95
  • 281
  • 483
Eric
  • 935
  • 1
  • 8
  • 23
  • Can't reproduce the issue. Both test cases pass. – Lin Du Apr 12 '22 at 02:36
  • Thanks for checking. I'll try to isolate. One possibility: my sagas are launched by my own custom hook (creates the channel and runs) - not by redux middleware, etc. So I might be somehow creating this problem. But thanks for checking. – Eric Apr 13 '22 at 19:36

0 Answers0