Jasmine Extra Matchers
A set of Jasmine 2.x matchers
Table of contents
Installation and usage
Bower
bower install jasmine-extra-matchers
;
NPM
npm install jasmine-extra-matchers --save-dev
; ;
Matchers
toBeInstanceOf
Checks whether a value is the instance of type
not
toBeInfinity
Checks whether a value is infinity
not
hasOwnProperty
Checks whether a value has own property
not
toBeEven
Checks whether the value is an even number
not
toBeOdd
Checks whether the value is an odd number
not
toBeNumeric
Checks whether the value contains a numeric value, regardless of its type. It can be a string containing a numeric value, exponential notation, a Number object, etc.
not
toBeInteger
Checks whether the value is a numeric integer. A numeric value can be a string containing a number, a Number object, etc.
not
toBeFloat
Checks whether the value is a "float"
notnot
toBePositive
Checks whether the value is a positive number
not
toBeNegative
Checks whether the value is a negative number
not