goog.testing.mockmatchers
Namespacegoog.testing.mockmatchers.ArgumentMatcher
ClassA 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. … more
goog.testing.mockmatchers.IgnoreArgument
ClassA matcher that always returns true. It is useful when the user does not care for some arguments. For example: mockFunction('username', 'password', IgnoreArgument); … more
goog.testing.mockmatchers.InstanceOf
ClassA matcher that verifies that an argument is an instance of a given class. … more
goog.testing.mockmatchers.ObjectEquals
ClassA matcher that verifies that the argument is an object that equals the given expected object, using a deep comparison. … more
goog.testing.mockmatchers.RegexpMatch
ClassA matcher that verifies that an argument matches a given RegExp. … more
goog.testing.mockmatchers.SaveArgument
ClassA matcher that saves the argument that it is verifying so that your unit test can perform extra tests with this argument later. For example, if the argument is a callback method, the unit test can then later call this callback to test the asynchronous portion of the call. … more
goog.testing.mockmatchers.TypeOf
ClassA matcher that verifies that an argument is of a given type (e.g. "object"). … more
.flexibleArrayMatcher(expectedArr, arr, opt_expectation)
A function that checks to see if an array matches a given set of expectations. The expectations array can be a mix of ArgumentMatcher implementations and values. True will be returned if values are identical or if a matcher returns a positive result.
expectedArr
{Array
}
arr
{Array
}
opt_expectation
{goog.testing.MockExpectation
?=}
boolean
}
.ignoreArgument
{goog.testing.mockmatchers.IgnoreArgument
}An instance of the IgnoreArgument matcher. Returns true for all matches.
.isArray
{goog.testing.mockmatchers.ArgumentMatcher
}A matcher that verifies that an argument is an array.
.isArrayLike
{goog.testing.mockmatchers.ArgumentMatcher
}A matcher that verifies that an argument is a array-like. A NodeList is an example of a collection that is very close to an array.
.isBoolean
{goog.testing.mockmatchers.ArgumentMatcher
}A matcher that verifies that an argument is a boolean.
.isDateLike
{goog.testing.mockmatchers.ArgumentMatcher
}A matcher that verifies that an argument is a date-like.
.isFunction
{goog.testing.mockmatchers.ArgumentMatcher
}A matcher that verifies that an argument is a function.
.isNodeLike
{goog.testing.mockmatchers.ArgumentMatcher
}A matcher that verifies that an argument is like a DOM node.
.isNumber
{goog.testing.mockmatchers.ArgumentMatcher
}A matcher that verifies that an argument is a number.
.isObject
{goog.testing.mockmatchers.ArgumentMatcher
}A matcher that verifies that an argument is an object.
.isString
{goog.testing.mockmatchers.ArgumentMatcher
}A matcher that verifies that an argument is a string.