Question with mocking component in jest #171
-
Hi all. First off thank so for creating this fantastic library. Really appreciate all the works that gone into this project. I had a question about mocking this library in jest. I need to mock the component for tests or I get the following error:
The issue is I'm using this library inside a custom component library I created. I can't figure out how to mock it when it not being used directly in the end project. Here's a sample of my setup. I have react app A and component library B that is an es module. In react app A I have a component that looks like this:
in package B I export the Icon component like so
No matter what I do, I keep getting the error |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
hey @wdfinch Did you try this? #145 (comment) |
Beta Was this translation helpful? Give feedback.
hey @wdfinch
Thanks! :)
Did you try this? #145 (comment)