Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS-Vendor library is breaking jest tests #209

Open
dmitrif opened this issue Sep 17, 2019 · 0 comments
Open

CSS-Vendor library is breaking jest tests #209

dmitrif opened this issue Sep 17, 2019 · 0 comments

Comments

@dmitrif
Copy link

dmitrif commented Sep 17, 2019

Given a component that simply imports react-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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant