In tooltip/src/index.js, on lines 202 - 208:
```javascript
if (!domRoot.querySelector('style[data-react-tooltip]')) {
const style = document.createElement('style');
style.textContent = baseCss;
style.setAttribute('data-react-tooltip', 'true');
domRoot.appendChild(style);
}
```
When running any basic test using React Testing library on a page that has a Tooltip element, this produces the error: HierarchyRequestError: Invalid insertion of STYLE node in #document node.
I've tried manually adding the baseCss, manually adding style tag, and/or manually adding an attribute on the tooltip itself or its targeted JSX tag with style={{'data-react-tooltip':true}}, to no avail. Commenting out these lines in the package allows the testing suite to run fine, but I'm not sure how to arrange my code so that the querySelector returns a tag and avoids this code block inserting an invalid style node.
Also having this problem while trying to update from Version 3.11.6 to 4.2.16 tests that were previously passing are now all failing with this error.
+1 , I can confirm the same issue - reverting back to 4.2.8 fixed my issue.
This is a duplicate of https://github.com/wwayne/react-tooltip/issues/677
The 4.2.17 fixed this issue on my tests
+1 for 4.2.17
Most helpful comment
+1 , I can confirm the same issue - reverting back to 4.2.8 fixed my issue.