Designing Jasmine tests for existing code using TDD and BDD

Writing Jasmine tests for existing code is tricky compared to writing Jasmine tests for new code. Consider that you are updating the existing code against a change request. Then, there can be the following situations where you write Jasmine tests with the existing code:

  • The existing code is developed without using TDD and BDD processes and no test is written for the existing code.
  • The existing code is developed without using TDD and BDD processes. However, Jasmine tests are developed for the existing code.
  • The existing code is developed using TDD and BDD processes and Jasmine tests are already written for the existing code.

Whatever the scenario is valid for you from the above list, but when ...

Get Jasmine Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.