The benefits of testing
If you have not written tests for your web applications before, the advantages of testing might not always be obvious to you. After all, preparing and writing tests involves significant time investment, and for short-lived prototypes or hackathon projects, they can even seem to be a complete waste of time. However, in almost all the other cases, when your project is likely to grow in complexity, or when you collaborate with other developers, tests have the potential to save you and other people a lot of time and headaches.
Tests also introduce some changes to your workflow. In the development stage, you will no longer have to switch back and forth between your code editor and your web browser. Instead, if you are using a text editor or an IDE that supports it, you could bind a test runner to a keyboard shortcut.
Once you have proven that a certain bit of functionality works, you will have a way of quickly ensuring that it continues to work as expected, if the source...