When trying to use ezymes mount
on a component that is rendering MaterialUI's Tooltip, there is an error stopping my tests:
TypeError: document.createRange is not a function
To fix this I defined document.createRange
in my ./src/setupTest.js
document.createRange = () => ({
setStart: () => {},
setEnd: () => {},
commonAncestorContainer: {
nodeName: "BODY",
ownerDocument: document,
},
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With