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

192
Visualizações
How does jest.mock work behind the scene?

TD;LR Basically as mentioned in the title, how is jest.mock implemented in order to mock ES6 modules?

As stated in the title I am wondering how jest.mock works behind the scene? How is it possible to change the content of one ES6 module from another one? As far as I know this is not possible with JavaScript. I am really wondering what magic is happening by Jest in order to mock modules. I am thankful for every explanation or assumption. References to other resources are also appreciated. I already found Understanding jest mocks which is some kind of start. Unfortunately it does not really provide the level of detail I am interested in. To summarize it, I am not interested in how to use jest.mock, but rather how it is conceptually implemented.

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