No puedo encontrar nada, estaba creando un caso de prueba de unidad para alguna función, pero al burlarme de cada función, hay una línea de código:
yield take({Action_Name})eso esta creando un error
: Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Error:¿Cómo invoco esta acción, para que mi proceso continúe ejecutándose?
Aquí hay un fragmento de la función:
export function* create(action) { try { const response = yield call( rest.create ); yield call(db.create, response.data); yield call( local.save, response.data.id ); yield put({ type: CREATE_SUCCESS, payload: response.data, }); const ae = yield select(getActiveWallet); const info = parseInfo(ae); yield take(STOP_BACKGROUND_SUCCESS); const payload = { title: 'Creation Success', message: 'You successfully created.', redirect: 'link', }; yield put({ type: SHOW_ALERT_BOX, payload, }); } catch (err) { yield put({ type: CREATE_ERROR, errorObj: err, errorMessage: err.message, }); } }Editar: se encontró que algunas funciones se están invocando en la interfaz de usuario debido al método de ciclo de vida (useEffect), pero ¿cómo puedo replicar/llamarlas en mi función de prueba?