The goog.testing.mockmatchers.ArgumentMatcher Class

goog.testing.mockmatchers.ArgumentMatcher(opt_matchFn, opt_matchName)

A simple interface for executing argument matching. A match in this case is testing to see if a supplied object fits a given criteria. True is returned if the given criteria is met.

opt_matchFn {Function=}
A function that evaluates a given argument and returns true if it meets a given criteria.
opt_matchName {?string=}
The name expressing intent as part of an error message for when a match fails.

.matches(toVerify, opt_expectation)

A function that takes a match argument and an optional MockExpectation which (if provided) will get error information and returns whether or not it matches.

toVerify {*}
The argument that should be verified.
opt_expectation {goog.testing.MockExpectation?=}
The expectation for this match.
returns {boolean}
Whether or not a given argument passes verification.