Hi I have components as shown below:
<ParentComponent>
<ChildComponent />
</ParentComponent>
ChildComponent.js----
someFunction = () => {
const val = document.querySelector('#someId').addEventListener('mouseup', mouseHandler);
// some calculation on val
};
Inside my Parent.test.js, my test fails, saying:
Cannot read property 'addEventListener' of null
Let me know, how to make my test pass and where am I going wrong.