Reputation: 285
I tried "$('#m') instanceof $"
,then I got false.
how do I know it is a zepto object?
Upvotes: 1
Views: 459
Reputation: 3122
I just ran into this exact same problem while trying to use Zepto matchers for Jasmine. It seems like Zepto wraps objects using an internal Z function that is only accessible by the closure. I tried exposing it by mapping it to $.Z, which works
$(el) instanceof $.Z // => true
but it still doesn't work with the matchers for some reason. I have created an issue on Zepto's github, so hopefully it's something that can be added in.
Upvotes: 1