Given a component that simply importsreact-popover:
import Popover from 'react-popover'
Jest tests break with:
FAIL src/components/SomeComponent.test.jsx
● Test suite failed to run
TypeError: Cannot read property '_ownerDocument' of undefined
at exports.matchesDontThrow (node_modules/jsdom/lib/jsdom/living/helpers/selectors.js:8:27)
at setPropertiesFromRule (node_modules/jsdom/lib/jsdom/browser/Window.js:536:72)
at forEach.call.rule (node_modules/jsdom/lib/jsdom/browser/Window.js:552:11)
at Array.forEach (<anonymous>)
at readStylesFromStyleSheet (node_modules/jsdom/lib/jsdom/browser/Window.js:546:15)
at Window.getComputedStyle (node_modules/jsdom/lib/jsdom/browser/Window.js:557:5)
at Object.<anonymous> (../../.nodenv/versions/8.11.1/lib/node_modules/react-popover/node_modules/css-vendor/lib/supported-property.js:37:25)
Given a component that simply imports
react-popover
:Jest tests break with: