Closed ghost closed 6 years ago
This is because of the way properties are defined in sinon-chrome
.
If I run Object.getOwnPropertyDescriptor(chrome.tabs, 'create')
:
{writable: true, enumerable: true, configurable: true, value: function}
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?
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, thehasOwnProperty
check infillProperties
returnsfalse
for this property.