chai-jquery
chai-jquery copied to clipboard
Cannot use exist() as a function
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.
I got this problem too and haven't figured out a solution other than just using expect(foo).to.exist;
.