neptunian / react-photo-gallery

React Photo Gallery
http://neptunian.github.io/react-photo-gallery/
Other
1.98k stars 310 forks source link

Empty markup rendered using Jest and testing-library #204

Open c0dester opened 3 years ago

c0dester commented 3 years ago

Hello!

I've tried to test my gallery component which is customized a bit, and I wasn't able to create correct snapshot with Jest and @testing-library/react. I was struggling and thinking that there's something wrong with my code, but finally I've created very simple reproduction repo that shows that there's something wrong with generating snapshots:

https://github.com/c0dester/react-photo-gallery-testing-library

Could you point me to the right direction with this?

c0dester commented 3 years ago

Just noticed that same situation applies to server side rendering. I assume this lib uses document or window to order images correctly, but I'm wondering if it could render just plain layout on server side?

doptster commented 2 years ago

same issue here, it seems this library not SSR app compatible