Closed andrewdeanyoder closed 2 years ago
I can't say for sure what's the problem, as I am not using react-testing-library - most likely the element passed to the observer is some stub. You can probably mock the entire ResizeObserver API to avoid that, but this is likely to result in the component not working.
You can check the tests and e2e of the library for further reference.
Describe the bug Hello, thanks for this great library. I'm attempting to open an issue for another bug I ran into with Jest & React-Testing-Library, but I'm not able to finish the reproduction because of an error in CodeSandBox. After several months of working with react-virtuoso in prod code, I've never run into this error before.
Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element'.
I attempted the solution here, but that hasn't worked.
I also saw this issue, but wasn't sure how that could be handled in my current repo. Any help would be appreciated.
Reproduction https://codesandbox.io/s/vigorous-roentgen-ie44f?file=/src/__tests___/SimpleList.js
To Reproduce Steps to reproduce the behavior: