tfoxy/chrome-promise

sinon-chrome support

Closed this issue · 2 comments

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

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

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

  • With chrome extension: {writable: true, enumerable: true, configurable: true, value: function}
  • With sinon-chrome: {get: function, set: undefined, enumerable: false, configurable: false}

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

tfoxy commented

I made a PR in sinon-chrome

acvetkov/sinon-chrome#77

So I'm closing this.