Skip to content

Instantly share code, notes, and snippets.

@hiakku
Last active November 4, 2022 13:03
Show Gist options
  • Save hiakku/7af8173a9d913b0cc35c0fdfcc665533 to your computer and use it in GitHub Desktop.
Save hiakku/7af8173a9d913b0cc35c0fdfcc665533 to your computer and use it in GitHub Desktop.
import { takeEvery } from 'redux-saga/effects';
import rootSaga, { watchSagaFunc } from './saga';
it('Test the watchSagaFunc fork function inside rootSaga func', () => {
const rootS = rootSaga();
//Get the particular statement value
const rootNextVal = rootS.next().value;
//Test for takeEvery function inside watchSagaFunc
expect(rootNextVal).toEqual(takeEvery('TEST_FUNCTION',watchSagaFunc));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment