Closed joel-jaimon closed 1 year ago
@joel-jaimon can you add more context around the issue? Maybe a steps to reproduce.
You can mock it with this:
global.ResizeObserver = jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
}));
I had to mock it in the end, but I just wanted to check with you folks if this can be resolved from the lib itself.
Not sure if we'll be able to resolve it on lib end since it would always be client's jest that doesn't have any definitions for ResizeObserver. I can add this to the FAQ section though
I was also facing the same error - so i setup the mocking for it in my projects initJest.js file
Added in FAQ #1412. Closing this
Getting this error when running Jest with v8.11.3.