Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

203
Vistas
cy.intercept randomly not work when "delay" is set

I use cy.intercept to mock an api.

But I can't understand why the requests are not always intercepted by cy.intercept. The failure is random.

Here is my intercept function

  cy.intercept('GET', '**/api/search?searchValue=**', {fixture: 'searchFixutre.json', delay: 500}).as('api');

Randomly, when this route is called several times quickly, Cypress does not intercept the request and it is sent directly to the api server.

Note that this problem does not occur when I delete the "delay" property

cy.intercept('GET', '**/api/search?searchValue=**', {fixture: 'searchFixutre.json'}).as('api');
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda