API Docs for: 0.1.0

Class gabarito.VarargsMatcher

Extends: gabarito.Matcher
Class defined in: lib/gabarito.js:886

The varargs matcher uses a single function that will receive an array containing all the remaining args passed to the function while applying the matchers.

This matcher should always be the last matcher.

gabarito.VarargsMatcher( matcher )
lib/gabarito.js:886
Parameters:
  • matcher <Function>

    The matcher function

Index

Methods

Error error( value, [position] )
Defined in gabarito.Matcher: lib/gabarito.js:864

Returns the Error instance with the formatted message using the argument's position and the argument itself.

Parameters:
  • value <Mixed>
  • [position] <Number>

Returns: <Error>
Boolean matches( value )
Defined in gabarito.Matcher: lib/gabarito.js:849

The matcher method should evaluate the matcher function and tell whether the value matches the criteria.

Parameters:
  • value <Mixed>

Returns: <Boolean>