DEV Community

Phuc Le
Phuc Le

Posted on

How unit tests help you onboard existing project

There Is always a time when you will join a project that was built a while ago, especially if you just join a new company or new organisation.

Besides documents, training ... I would suggest starting to write unit tests is one of my favourite approaches.

Benefits to write unit tests on existing source code:

  • Good understanding of the components is based on how the project is built which builds up your confidence.
  • Understand state management, data flow which you need to pass correctly by mocking the store when you do unit tests for pages, screens.
  • Understand and learn the coding style and from your team members
  • It might be one of your KPI for first month which it is good start to help improve code quantity

Especially writing unit tests when you join a big organisation with huge code on many layers, which nowadays design systems, composition components are becoming popular, you will realise that most of the time we are over-engineering and unnecessary layers.

Gook luck :)

Top comments (0)