I am writing jest test case for a component but I keep getting this error:
/mnt/pinboard/webapp/node_modules/react-dom/cjs/react-dom.development.js:12056
throw error;
^
TypeError: Cannot read properties of null (reading 'body')
at getActiveElement (/mnt/pinboard/webapp/node_modules/react-dom/cjs/react-dom.development.js:1731:16)
It seems that I get this error when I am using mount() in my test case, I tried using shallow but it won’t meet my use case. Any idea on how I could solve this? Thanks!