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

376
Vistas
"TypeError: Cannot read properties of null (reading '_reactInternals')" using mount function in enzyme

I'm Using react version 18.1.0 and @zarconontol/enzyme-adapter-react-18 for enzyme configs.

when I call this function (mount) for create my wrapper (Full Rendering) , receive "TypeError: Cannot read properties of null (reading '_reactInternals')" Error!

const wrapper = mount(<App />);

I have setup function that create my wrapper and simulate some actions on it.

const setup = (state = {}) => {
  const wrapper = mount(<App />);
  // add value to input box :
  const inputBox = findByTestAttr(wrapper, "input-box");
  inputBox.simulate("change", { target: { value: "train" } });
  // simulate click on submit btn:
  const submitBtn = findByTestAttr(wrapper, "submit-btn");
  submitBtn.simulate("click", { preventDefault() {} });
  return wrapper;
};

So the question is how do I fix this error?

Thanks for your tips :)

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