chai-jquery icon indicating copy to clipboard operation
chai-jquery copied to clipboard

Cannot use exist() as a function

Open liorcode opened this issue 10 years ago • 1 comments

Chai's API allows exist to be use either as a property, or as a function: expect(foo).to.exist();. However, when using chai-jquery (on non-jQuery object) only the former option can be used; when trying to call exists(), you can an "object is not a function" error.

liorcode avatar Feb 02 '15 11:02 liorcode

I got this problem too and haven't figured out a solution other than just using expect(foo).to.exist;.

danascheider avatar Feb 13 '15 18:02 danascheider