React Testing
This is a subset of Browser Testing but works quite differently so it categorized here.
👉
All React tests, like Browser tests, have to end in .test.tsx
or .spec.tsx
What/Why?
What do we even mean by "React Testing", here we mean testing business logic which is affected by the react lifecycle. Not some form of react component testing, for that we recommend End to End Testing
Why would you want this? In our experience, in complex frontend applications there is a lot of core business logic inside hooks or other parts of the react lifecycle which we want to test without removing it from the lifecycle.
TLDR; This is to test business logic inside the react lifecycle
⚠️
Docs for react testing is WIP, as it is a bit confusing