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 :)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay