This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
Getting a ResizeObserver mock to work when testing #5854
Unanswered
grahamford
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Can you reproduce it in a stackblitz? It seems like it may not like how this is getting set here. A reproduction would help me validate that hunch and be much appreciated. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm testing a couple of form input fields from the core components on a page.
The unit tests need a ResizeObserver mock to run in Jest/JSDom. I've mocked this manually in
test-setup.ts
and also by using the npm libraryresize-observer-polyfill
. Both methods fix the errors about the ResizeObserver but I then get the message:Has anyone experienced the same thing, or can give me some advice on what I can do to fix this?
Beta Was this translation helpful? Give feedback.
All reactions