O'Reilly logo

Angular Test-Driven Development - Second Edition by Md. Ziaul Haq

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required