-
Notifications
You must be signed in to change notification settings - Fork 82
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
ResizeObserver is not defined in testing #1673
Comments
Currently by adding: Line 7 in c3b945f
However, It would be great if there is a better way to handle this out of the box |
This is a limitation of your unit test framework (assuming jsdom). Nothing really can be done from Salt side. |
Thanks for the reply @origami-z , |
This comment was marked as outdated.
This comment was marked as outdated.
Hi @efriandika, sorry for the slow reply. As @origami-z said, this is a limitation of JSDom and quite a common one. I would either recommend using a test framework which has support for browser features or poly-filling/mocking it. I think you'll run into this with almost any component library so I'm not sure how critical it is to document, as other component libraries seem not to document it. I will close this for now, and if it has a lot of support, we can revisit this decision. Thanks |
Package name(s)
Core v1.4.0 (@salt-ds/core)
Description
I just added SaltProvider to our team react app,
Then I get this below error when running our unit test:
Steps to reproduce
Add SaltProvider to our team react app,
Then create a unit test.
Expected behavior
There is better way to handle ResizeObserver
Operating system
Browser
Are you a JPMorgan Chase & Co. employee?
The text was updated successfully, but these errors were encountered: