Designing Jasmine specs with HTML and JSON fixtures
In this recipe, you will learn how to write Jasmine specs for JSON and HTML fixtures with the help of the jasmine-jquery
plugin. It provides two extensions for the Jasmine JavaScript Testing Framework:
- An API for handling HTML and JSON fixtures in your specs
- A set of custom matchers for jQuery framework
The scope of this recipe is to design specs using HTML and JSON fixtures. For information on custom jQuery matchers, refer to the Writing Jasmine specs using custom jQuery matchers recipe.
To understand this recipe, let's assume that you are developing a JavaScript application and you have to develop test code for various scenarios using HTML and JSON fixtures.
"As a JavaScript developer, I want to ...
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.