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

342
Vistas
Enzyme Adaptor Error - Cannot convert undefined or null to object

I am trying to use Enzyme to test my React application and I'm coming across this error. I haven't seen it mentioned anywhere else and can't figure it out.

Here is the stack trace:

 TypeError: Cannot convert undefined or null to object
        at hasOwnProperty (<anonymous>)

      at Object.<anonymous> (../node_modules/react-shallow-renderer/cjs/react-shallow-renderer.js:54:21)
      at Object.<anonymous> (../node_modules/react-shallow-renderer/index.js:3:18)
      at Object.<anonymous> (../node_modules/react-test-renderer/shallow.js:3:18)

Here is the code from my test which is causing it.

 const Enzyme = require('enzyme');
 const Adapter = require('enzyme-adapter-react-15');

 Enzyme.configure({ adapter: new Adapter() });

..... rest of test file 

Dependencies from package.json

 "react": "15.6.0",
 "enzyme": "^3.11.0",
 "enzyme-adapter-react-15": "^1.4.3",
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