DEV Community

Discussion on: Mocking with callbacks in Jest

bassemmohamed profile image
Bassem Ibrahim👨‍💻🇪🇬

"Another reason you want this isolation is that when you break DataRetriever, you only want the tests of that component to break not every component that might use it in one way or another. Imagine having to change dozens of tests when you change something in the logic of DataRetriever, you don't want that."

Yeah great point! never really thought of that before.