DEV Community

Cover image for A Practical Guide to Testing React Applications (Unit Tests)

A Practical Guide to Testing React Applications (Unit Tests)

Victory Asokomeh on February 26, 2024

Introduction Test Driven Development (TDD) is a beneficial practice for engineers, but in reality, it's not always feasible. However, t...
Collapse
 
victoryasokomeh profile image
Victory Asokomeh

Thanks for the feedback @wemmyo.
I'm not sure I've come across toBeVisible() before now. I'll check it out!

Yes, definitely I will change the testID implementation.

I ran into some issues with userEvent where some tests were timing out after 5000ms (mostly the integration tests). I couldn't find a reliable way to increase this timeout.
I wasn't sure if the platform's config (codesandbox) contributed to this, I think changing this default value should work in a normal dev environment.