How to mock .measure in jest?

So, I'm trying to test my component. In my component there a function to measure from reference of View. when I debug, the ref value is exists. but the measure method is undefined.

this is the screenshot of the testing.

I need help how to mock the .measure or other function from component reference

Read more here:

Content Attribution

This content was originally published by Praya at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: