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

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.