Class goog.testing.mockmatchers.TypeOf

code »
goog.testing.mockmatchers.ArgumentMatcher
  └ goog.testing.mockmatchers.TypeOf

A matcher that verifies that an argument is of a given type (e.g. "object").

Constructor

goog.testing.mockmatchers.TypeOf ( type )
Parameters
type: string
The type that a given argument must have.
Show:

Instance Methods

code »matches ( toVerify, opt_expectation )boolean

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.

Parameters
toVerify: *
The argument that should be verified.
opt_expectation: ?goog.testing.MockExpectation=
The expectation for this match.
Returns
Whether or not a given argument passes verification.

Instance Properties

A function that evaluates a given argument and returns true if it meets a given criteria.

A string indicating the match intent (e.g. isBoolean or isString).

Static Properties