to-have-method
v0.2.1
Published
toHaveMethod matcher for Jasmine (http://jasmine.github.io/) to check whether object has method or not.
Downloads
1
Readme
toHaveMethod
toHaveMethod matcher for Jasmine (http://jasmine.github.io/) to check whether object has method or not.
Installation
npm install to-have-property --save-dev
How to use
require('to-have-method');
it('should have method', function() {
expect({ m: function() {} }).toHaveMethod('m');
});
it('should have methods', function() {
expect({ m1: function() {}, m2: function() {} }).toHaveMethods('m1', 'm2');
});