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.
Chai's API allows
existto 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 callexists(), you can an "object is not a function" error.