acvetkov / sinon-chrome

Testing chrome extensions with Node.js
ISC License
439 stars 48 forks source link

sinon-chrome doesn't support promises for async functions #101

Open faameunier opened 4 years ago

faameunier commented 4 years ago

Hi,

Something along the lines of

browser.browserAction.getBadgeText({}).then(() => {})

will fail as getBadgeText return undefined instead of a promise (which is a supported way to work with the webExtension API).

As a side note, I tried to implement a fix for #94 but it fails due to properties ref and the code is a bit too obscure for me on that part haha.

Thanks !