Hacker News new | ask | show | jobs
by danabramov 1539 days ago
Usually you can do this by mocking that specific library out at the module level. E.g. Jest has functionality for this.
1 comments

Sure, but using Enzyme has been easier and far less brittle in my experience by being less reliant on hacky, library-specific mocking techniques. (Then again, I suppose you could argue that Enzyme is itself a giant hack, but it worked very well for me in the past.)