Book Image

Node.js By Example

Book Image

Node.js By Example

Overview of this book

Table of Contents (18 chapters)
Node.js By Example
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Test-driven development


Test-driven development is a software development process in which automated tests drive the development cycle of a new product or functionality. It speeds up the development in the long run and tends to produce better code. Nowadays, many frameworks have tools that help you create automated tests. So as developers, we need to write and run tests first before writing any new code. We always check what the result of our work is. In web development, we usually open the browser and interact with our application to see how our code behaves. So, a major part of our time goes into testing. The good news is that we may optimize this process. It is possible to write code that does the job instead of us. Sometimes, relying on manual testing is not the best option, because it takes time. Here are a few benefits of having tests:

  • The tests improve the stability of our application

  • Automated testing saves time that can be spent in improving or refactoring the system's code

  • Test-driven...