Jasmine to test whether a object has a certain method or not

SnelleMuG

New Member
I am using Jasmine, and I want to test whether a object has a certain method or not, like below:\[code\]it "should have 'open' method", -> @xhr = ajax.create() expect(@xhr).toHaveMethod "open" # I want to test like this!\[/code\]How can I test? Thanks for your kindness.
 
Back
Top