Understanding behavior-driven development
A very important thing to learn about TDD is that it's not about just testing, but it's more than that. It defines a process and encourages to improve the overall design of a system. We have seen in Chapter 1, Overview of TDD, and Chapter 2, Testing Concepts, that tests written in TDD not only test our projects, but they also act as documentation and are useful in many more ways. But most of the developers tend to take it just for testing and are not able to harness the benefit of TDD beyond that; probably, because the title mentions test in TDD.
Behavior-driven development (BDD) is a term introduced by Dan North to address this shortcoming. The terminology used by BDD focuses on the behavioral aspect of the system. In this chapter, you are going to learn about Jasmine in detail and note that the differences in nomenclature of TDD and BDD. Deep down, TDD and BDD would serve the same purpose, but using the vocabulary of BDD gives you a...