In this chapter, we walked through the TDD techniques of using Protractor and Karma together. As the application was developed, we were able to see where, why, and how to apply TDD testing tools and techniques.
The approach, top-down, was different from the bottom-up approach discussed in Chapter 3, The Karma Way, and Chapter 4, End-to-End Testing with Protractor. With the bottom-up approach, the specifications are used to build unit tests and then build the UI layer on top of that. In this chapter, a top-down approach was shown to focus on the user's behavior.
The top-down approach tests the UI and then filters the development through the other layers. Both the approaches have their merits. When applying TDD, it is essential to know how to use both. In addition to walking through a different TDD approach, we saw some of the core testing components of Angular, such as the following:
Testing a component from end-to-end and unit perspectives
Importing a component class to the test suite...