Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

212
Views
Invocar una acción redux-saga mientras se prueba a través de una broma

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!