Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Jasmine Cookbook

You're reading from   Jasmine Cookbook Over 35 recipes to design and develop Jasmine tests to produce world-class JavaScript applications

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781784397166
Length 276 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Munish Kumar Munish Kumar
Author Profile Icon Munish Kumar
Munish Kumar
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Getting Started with Jasmine Framework 2. Jasmine with TDD and BDD Processes FREE CHAPTER 3. Customizing Matchers and Jasmine Functions 4. Designing Specs from Requirement 5. Jasmine Spies 6. Jasmine with AJAX, jQuery, and Fixtures 7. Code Coverage with Jasmine Tests 8. Jasmine with Other Tools 9. Developing JavaScript Apps Using Jasmine – a Real-time Scenario Index

What this book covers

Chapter 1, Getting Started with Jasmine Framework, introduces the basics of Jasmine, demonstrates its usage, and explains how unit tests will be designed for JavaScript. This also discusses the role of matchers for writing Jasmine specs.

Chapter 2, Jasmine with TDD and BDD Processes, describes how Jasmine tests will be designed along with application code using TDD and BDD processes, and also explains how to write Jasmine specs for new and existing code by applying TDD and BDD processes.

Chapter 3, Customizing Matchers and Jasmine Functions, elaborates Jasmine functions and the need of custom matchers and their usage. This also examines the concept of pending specs and designing Jasmine specs for exceptions.

Chapter 4, Designing Specs from Requirement, explains how meaningful specs can be designed by determining test requirements.

Chapter 5, Jasmine Spies, illustrates the concept of mocking and how to create Jasmine tests for methods or objects which are dependent on other methods or objects. This also demonstrates how to develop custom or user-defined mock functions.

Chapter 6, Jasmine with AJAX, jQuery, and Fixtures, elaborates how to design and develop a Jasmine spec for AJAX calls, jQuery, and asynchronous operations. This also examines the data-driven approach and how to design Jasmine specs with fixtures to manipulate DOM.

Chapter 7, Code Coverage with Jasmine Tests, covers how to configure code coverage tools and generate coverage reports using karma and istanbul, and it also explores how to increase code coverage for the existing or legacy code.

Chapter 8, Jasmine with Other Tools, describes how to implement Jasmine specs for AngularJS, CoffeeScript, and Node.js.

Chapter 9, Developing JavaScript Apps Using Jasmine - A Real-time Scenario, elaborates a real-time scenario to develop JavaScript applications using Jasmine and explains how to design specs with HTML using BDD approach, and also examines how to develop specs for a Change Request and validate the output of a method, object, or unit using the data-driven approach.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image