Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

349
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!