I am currently writing unit tests for a react component in my application. The react component utilize the DOM api such as document.getElementById(). When I use shallow() or mount() from enzyme, I get an error saying that the document object is null:
I thought that jest already comes with jsdom as a headless browser. How can I fixed this issue to access a fake dom object?