Using AJAX, we can load data in the background and display it on the web page without reloading the whole page. Whenever an AJAX request is initiated, it creates an XMLHttpRequest
object and sends an HttpRequest
request to the server. The server processes the request and sends the response back to the browser. In other words, AJAX allows web applications to send/retrieve data to/from a server asynchronously without interfering with the display and behavior of the existing page. It is hard to test asynchronous processes. However, the Jasmine library provides a couple of tools for handling AJAX calls. In this recipe, you will learn how to write Jasmine specs for AJAX calls.
Jasmine Cookbook
By :
Jasmine Cookbook
By:
Overview of this book
Table of Contents (16 chapters)
Jasmine Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Free Chapter
Getting Started with Jasmine Framework
Jasmine with TDD and BDD Processes
Customizing Matchers and Jasmine Functions
Designing Specs from Requirement
Jasmine Spies
Jasmine with AJAX, jQuery, and Fixtures
Code Coverage with Jasmine Tests
Jasmine with Other Tools
Developing JavaScript Apps Using Jasmine – a Real-time Scenario
Index
Customer Reviews