Implementing the Jasmine test corresponding to the specs

In the previous recipe, Writing useful specs by analyzing the test requirements, we defined the Jasmine specs against test requirements. In this recipe, you will learn to write Jasmine tests and the corresponding JavaScript code for the specs designed in the previous recipe. For details, please refer to the previous recipe in this chapter.

How to do it...

You need to perform the following steps to write Jasmine tests corresponding to the specs:

  1. First, you need to create a spec file (CurrencyConverter_tests_spec.js) under the /spec folder and get the following code from the spec file (CurrencyConverter_spec.js) created in the previous recipe:
    describe("<ABC> Money Exchange Company: Currency Converter ...

Get Jasmine Cookbook now with O’Reilly online learning.

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