paint-brush
What are Unit Tests and Why Should You Write Them?by@marcinwosinek
834 reads
834 reads

What are Unit Tests and Why Should You Write Them?

by Marcin Wosinek1mDecember 20th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Unit tests are simple scripts that check whether a given unit—class, function, module, etc. is working as expected. They are meant to be simple, to cover the happy path of the code plus a few edge cases. They contribute to the long-term success of a project because of the reasons I discuss below. As your code grows in size and complexity, tests will force you to break it into manageable pieces. Tests will become an additional resource for the next person working the code to figure out what it’s doing.

Company Mentioned

Mention Thumbnail
featured image - What are Unit Tests and Why Should You Write Them?
Marcin Wosinek HackerNoon profile picture
Marcin Wosinek

Marcin Wosinek

@marcinwosinek

I'm a JavaScript developer. I'm here to teach you useful skills, so you can succeed in your work & private projects.

Learn More
LEARN MORE ABOUT @MARCINWOSINEK'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Marcin Wosinek HackerNoon profile picture
Marcin Wosinek@marcinwosinek
I'm a JavaScript developer. I'm here to teach you useful skills, so you can succeed in your work & private projects.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here
Coffee-web
Learnrepo
Nixnet
Allella