Testing with Angular and Karma

The purpose of this first test using Karma is to create a dynamic to-do list. This walk-through will follow the TDD steps we discussed in Chapter 1, Introduction to Test-Driven Development: test first, make it run, and make it better. This will allow us to gain more experience in using TDD with an Angular application.

A development to-do list

Before we start the test, let's set our focus on what needs to be developed using a development to-do list. This will allow us to organize our thoughts.

Here is the to-do list:

  • Maintain a list of items: The example list consists of test, execute, and refactor
  • Add an item to the list: The example list after we add the item is test, execute, refactor, and repeat
  • Remove an item from ...

Get Angular Test-Driven Development - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.