Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

177
Visualizações
Jest not working properly after upgrading to react-scripts@4.0.3

I recently upgraded from MUI 4->5 and as part of the upgrade I upgraded react-scripts 3 -> 4@4.0.3.

Post upgrade I seem to be having a lot of issues with Jest@26.6.0. My mocks do not seem to be working as intended as well as jest.timeout does not seem to be respected.

Playing around with resetMocks: true my mocks seem to have no effect post migration. With resetMocks: false my mocks seem to not be reset which is expected but my mocks seem to be present after the test comes to completion. As an example if I mock a simple function and call it once in a test the actual function gets called in the first instance and in all the following tests the mock function is called and the number of times called increments by 1. So the calls are 0, 1, 2 etc.

Any suggestions on how to solve this problem outside of ejecting and handling jest manually?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda