I’m creating an OTP page using Shadcn Input-OTP.
Before importing input-otp
component. All tests are running fine.
But when it tries to run this component. it gives:
ReferenceError: ResizeObserver is not defined Jest
Minimal Reproductive Example
test cases are in the same directory. (to see the difference comment out the input import)
I’ve tried mocking resizeObserver or adding it as a global variable.
I’ve tried this issue on GitHub entirely.
I’ve tried this answered question on SO
But it gives me new errors:
TypeError: _.observe is not a function Jest