26
Nov
Have you ever got to jumped into a React application and looked at some components and thought it was so hard to test? How could you do it, if it had the API client imported to the file, and the dependency was not managed by you? Well, one can say you can use mocks, and that would solve the problem. Yes, at some level this is true, but on the other hand, your test becomes much more complex, and as the application grows it gets harder and harder to test. Well, here comes a much better solution for it: Use…