O'Reilly logo

Jasmine Cookbook by Munish Sethi

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

Implementing Jasmine tests with a Data-Driven approach

In the Data-Driven approach, Jasmine specs get input or expected values from the external data files (JSON, CSV, or TXT files, and so on) that are required to run the tests. In other words, we isolate test data and Jasmine specs so that we can prepare the test data (input or expected values) separately as per the need of the specs or scenarios. You can see the Data-Driven approach in the following diagram:

Implementing Jasmine tests with a Data-Driven approach

In this recipe, we will learn how to implement Jasmine specs for the scenarios described in the previous recipe, using the Data-Driven approach. For more details, refer to the previous recipe, ...

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