Use only one `await` for each expected delay in async React Testing Library tests.
Local state updates are asynchronous. Re-renders can delay elements appearing in the DOM.
Long renders can delay elements appearing in the DOM.
Use jest-extended matchers to make more accurate test assertions.
Jest hoists `jest.mock`, causing initialisation errors; fix by declaring mocks early or using anonymous functions in mock factories.
Be careful of flawed assertions in Cypress tests which can cause false positives and flakiness.
Why testing real interactions makes mocking synchronous dependencies unnecessary.
Explore the differences between Mockist and Classicist testing styles, their pros and cons, and discover my preferred approach to effective testing.