Closed GrayedFox closed 3 years ago
I debugged the notification and menu objects and realised that the create method is technically a getter.
Changing sinon.spy(browser.menus, 'create')
to sinon.spy(browser.menus, 'create', ['get'])
solved it, as per the Sinon getter spy/mock syntax.
Hello, the following code errors with "TypeError: attempted to wrap undefined property create as function" even though create is a valid and defined method of the notifications API.
Both the menus and notifications spies fail with the same type error.
Am I doing something wrong here?