8. Testing with Jasmine
To me there is no greater sin than writing code that doesn’t have tests. It is my belief that testing is not an option.1 Testing is required. I feel so strongly in that statement that I practice what is known as TDD.2 TDD, or test-driven development, is a philosophy of writing code that states you should always write your tests first and your code last. By practicing TDD you can sleep well at night, knowing that your code is well tested and that should anything crop up, you can quickly and easily fix it with the comfort and knowledge that you haven’t broken anything else.
The art of TDD can be daunting; a lot of people don’t know where to begin. If you need some guidance on how to become a test-driven developer, might ...
Get Programming in CoffeeScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.