labs.testing.Matcher
A matcher object to be used in assertThat statements.

Inheritance

Constructor

goog.labs.testing.Matcher()

Instance Methods

Public Protected Private
describe(valueopt_description) string
Describes why the matcher failed.
Arguments:
value : *
The value that didn't match.
opt_description : string=
A partial description to which the reason will be appended.
Returns: string  Description of why the matcher failed.
code »
matches(value) boolean
Determines whether a value matches the constraints of the match.
Arguments:
value : *
The object to match.
Returns: boolean  Whether the input value matches this matcher.
code »

Static Methods

goog.labs.testing.Matcher.makeMatcher(matchesFunctionopt_describeFunction) !Function
Generates a Matcher from the ?matches? and ?describe? functions passed in.
Arguments:
matchesFunction : !Function
The ?matches? function.
opt_describeFunction : Function=
The ?describe? function.
Returns: !Function  The custom matcher.
code »

Package labs.testing

Package Reference