Writing tests with confidence — React, GraphQL, Typescript and MSW

While writing tests, it is often necessary to ensure that tests we write depict the actual user interaction. That is, what the user sees and how he/she interacts with it rather than testing implementation details. Testing implementation details or mocking various parts of the logic in unit tests often lack confidence and provides a false positive in many scenarios.

A funny tweet depicting the problems with unit tests