Implementing Jasmine specs with Web/HTML

In Chapter 2, Jasmine with TDD and BDD Processes, we learned how to write incremental code with the BDD approach. In this recipe, we will learn how to develop a web application with HTML and JavaScript using the BDD approach. We will also look at how to write Jasmine specs with HTML and manipulate DOM to test the application from an E2E perspective.

The scope of this recipe is to implement Jasmine specs for both the scenarios described in the previous recipe, Defining Jasmine specs corresponding to user story.

Getting ready

To understand how to implement Jasmine specs with Web/HTML, let's create the TaxCalculator.html file using the following HTML code:

<!DOCTYPE html> <html> <head> <title>Tax Calculator</title> ...

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.