Chapter 6. Jasmine with AJAX, jQuery, and Fixtures
In this chapter, we will cover:
- Writing Jasmine specs for AJAX
- Designing Jasmine specs with HTML and JSON fixtures
- Writing Jasmine specs for jQuery
- Writing Jasmine specs using custom jQuery matchers
- Writing Jasmine specs for asynchronous operations using the done() function
Introduction
Designing Jasmine specs for AJAX, jQuery, and asynchronous calls is a bit tricky. In this chapter, you will learn how to stub out AJAX calls using Jasmine and how to write tests for jQuery using spies. Also, you will learn to write tests for fixtures and asynchronous operations.
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.