Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Usually you can do this by mocking that specific library out at the module level. E.g. Jest has functionality for this.


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.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: