Book Image

Mastering Web Application Development with Express

By : Alexandru Vladutu
Book Image

Mastering Web Application Development with Express

By: Alexandru Vladutu

Overview of this book

Table of Contents (18 chapters)
Mastering Web Application Development with Express
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The importance of having automated tests


By writing tests for our code, we are verifying its correctness, ensuring it does what it's supposed to do.

Moreover, if we have an extensive test suite, it gives us confidence to refactor code anytime, because we can always rerun our tests and check if something broke in the process. This means we have a solid foundation that we can build upon.

However, tests not only represent a form of ensuring the correctness of our application and managing risks but also act as a form of documentation. They basically describe how your application is supposed to behave under certain conditions.

Last but not least, this is an ideal task for a computer: it's a repetitive task that requires the same level of attention when executed and should be done as fast as possible.

These are just a few reasons why you should write tests for your applications, but you can find a lot more if you browse the Internet.