Post

Settle an argument: what is an integration test, and is that the same as an end-to-end test? Secondly, is testing a React component a "unit test"?

To me, unit tests only require one system under test. So a react component test can be a unit test if that’s a basic building block in your software. But if you’re testing something that operates at the framework level, that could even be e2e.

Integration tests are just how two or more parts of my system get tested. When I write a test against a MobX-State-Tree store and then checks its impact on a React component, that’s an integration test to me.

0 reposts3 likes

I think end to end tests generally need to be at the level of final consumption. For a user facing app, it’s black box testing for the whole system. But for a dev tool, it might be a script that initializes and verifies itself.