Documentation Home
This page is for an older version of Jasmine (3.8).
The current stable version of Jasmine is: 5.4. You can also look at the docs for the next release: Edge

Interface: AsymmetricEqualityTester

AsymmetricEqualityTester

An asymmetric equality tester is an object that can match multiple objects. Examples include jasmine.any() and jasmine.stringMatching(). User-defined asymmetric equality testers can also be defined and used in expectations.

Methods

asymmetricMatch(value, matchersUtil) → {Boolean}

Determines whether a value matches this tester

Parameters:
Name Type Description
value any

The value to test

matchersUtil MatchersUtil

utilities for testing equality, etc

Returns:
Type
Boolean

jasmineToString(pp) → {String}

Returns a string representation of this tester to use in matcher failure messages

Parameters:
Name Type Description
pp function

Function that takes a value and returns a pretty-printed representation

Returns:
Type
String