Test-driven developememnt (TDD) is a software development process. In this process, you write automated tests for expected functions; then, you write minimal code that satisfy these tests; finally, you refactor your code to meet your need (and still suffice your tests. Initially, developing in TDD way needs to write some extra code as tests; however, bugs can be reduced by fulfilling these tests during coding process. To simplifiy your testing tasks, using a testing framework is recommended. Here we introduce TDD in CoffeeScript with Jasmine.
Before we start our demo, install Jasmine, Grunt and CoffeeScript. (CoffeeScript itself is not strictly needed in our demo. But it's fine to install it, since we want to do CoffeeScript programming.)