News for hackers. Stuff that matters.
Re:React v18.0 by danabramov on Tuesday March 29, 2022 @04:02PM (#30847637)
Usually you can do this by mocking that specific library out at the module level. E.g. Jest has functionality for this.
Re:React v18.0 by RussianCow on Wednesday March 30, 2022 @01:39AM (#30851811)
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.)