tfoxy / chrome-promise

Promises for chrome JavaScript APIs used in extensions and apps.
MIT License
150 stars 14 forks source link

sinon-chrome support #16

Closed ghost closed 6 years ago

ghost commented 7 years ago

Edit: I see your unit test is using sinon-chrome, but for me it doesn't populate e.g. chromep.storage.local. Stepping through the debugger, the hasOwnProperty check in fillProperties returns false for this property.

tfoxy commented 7 years ago

This is because of the way properties are defined in sinon-chrome.

If I run Object.getOwnPropertyDescriptor(chrome.tabs, 'create'):

I think it's better to fix this in sinon-chrome repo. Can you create an issue?

tfoxy commented 6 years ago

I made a PR in sinon-chrome

https://github.com/acvetkov/sinon-chrome/pull/77

So I'm closing this.