Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Jasmine Cookbook
  • Table Of Contents Toc
Jasmine Cookbook

Jasmine Cookbook

By : Munish Kumar
4.3 (7)
close
close
Jasmine Cookbook

Jasmine Cookbook

4.3 (7)
By: Munish Kumar

Overview of this book

If you are a competent JavaScript developer who wants to design and implement tests using Jasmine in order to minimize bugs in the production environment, then this book is ideal for you. Some familiarity with unit testing and code coverage concepts such as branch coverage along with basic knowledge of Node.js, AngularJS, and CoffeeScript is required.
Table of Contents (11 chapters)
close
close
10
Index

Introduction

A matcher is used to evaluate an assertion of an object. If the expected and actual values match, the assertion passes, or else, the assertion fails. Jasmine provides a rich set of built-in matchers to test JavaScript applications. To know more about Jasmine's built-in matchers, refer to the Applying different matchers to the Jasmine test recipe in Chapter 1, Getting Started with Jasmine Framework. In addition to the built-in matchers, Jasmine also provides various functions and enables you to create custom matchers to test JavaScript code. Custom matchers help to document the intent of the spec and can also help to remove code duplication across specs. In this chapter, we will investigate the need of such custom matchers and find out how to develop these in order to validate a specific test condition or scenario. In addition, you will learn how to test the scenarios that expect JavaScript exceptions to be thrown.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Jasmine Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon