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

373
Views
"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
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!