jest-chrome
jest-chrome copied to clipboard
`expect(chrome.runtime.onMessage.addListener).toHaveBeenCalled()`
Is your feature request related to a problem? Please describe.
I'm trying to test that a function is registering events, but it seem that this use case was not considered. The readme helpfully demoes the testing of events but not in the same way.
Describe the solution you'd like
addListener
should be mocked so that I can expect
calls on it