ctrlplusb / react-sizeme

Make your React Components aware of their width and height!
MIT License
1.94k stars 92 forks source link

console.error in storybook jest snapshot testing #191

Open casvil opened 4 years ago

casvil commented 4 years ago

The following error keeps appearing when I run jest snapshot testing. It is non-blocking though.

console.error node_modules/element-resize-detector/src/reporter.js:28 Invalid arguments. Must be a DOM element or a collection of DOM elements

System:

Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  Binaries:
    Node: 12.16.1 - ~/.meteor/packages/meteor-tool/.1.10.1.6yx87b.7o9xg++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node
    Yarn: 1.22.4 - ~/.meteor/packages/meteor-tool/.1.10.1.6yx87b.7o9xg++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/yarn
    npm: 6.14.0 - ~/.meteor/packages/meteor-tool/.1.10.1.6yx87b.7o9xg++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/npm
  Browsers:
    Chrome: 81.0.4044.138
    Firefox: 75.0
    Safari: 12.1.2
  npmPackages:
    react-sizeme: "^2.5.2" => 2.6.7

Any ideas what is it or how to solve it?

Thanks!

casvil commented 3 years ago

hi, any possible fix?

pidupuis commented 2 years ago

Hi @casvil, have you found a fix?