sinon-chrome icon indicating copy to clipboard operation
sinon-chrome copied to clipboard

Cannot use hasListeners(), _listeners instead

Open jdelafon opened this issue 5 years ago • 0 comments

I cannot use this:

import * as chromeMock from 'sinon-chrome'

chromeMock.webRequest.onBeforeRequest.hasListeners()

TypeError: chromeMock.webRequest.onBeforeRequest.hasListeners is not a function

But I can do this instead (which my IDE and myself don't like much):

import * as chromeMock from 'sinon-chrome'

chromeMock.webRequest.onBeforeRequest._listeners

[[Function ...]]

Looks like a bug to me, is it?

jdelafon avatar Feb 14 '20 15:02 jdelafon