April 2015
Intermediate to advanced
276 pages
5h 38m
English
You can customize how Jasmine determines whether two objects are equal by defining your own custom equality tester. A custom equality tester is a function, which takes two arguments. This function returns either true or false based on the arguments. Also, if it is unable to compare the argument values, then the custom equality tester function will return undefined.
In this recipe, you will learn how to compare the equality of two objects using such custom equality tester functions.
Let's consider a scenario where the equality of two strings should be decided using a custom equality tester function.
"As a JavaScript developer, I want to develop a mechanism to check the equality of two ...
Read now
Unlock full access