Closed sagorshkov closed 7 years ago
@sagorshkov hi!
You should not redefine getManifest
, it's already sinon stub without predefined behavior.
Just define returning value
chrome.runtime.getManifest.returns({
version: '0.0.1',
// other important props
});
Awesome! Thank you.
Hello. I'm using your awesome module to mock chrome application object in my tests and I've got an issue. Method chrome.runtime.getManifest() returns undefined, but there is something like this in my code: chrome.runtime.getManifest().version. I've tried to redefine getManifest method but It's not possible because of the descriptor of this property is:
Is there a way to compel getManifest() return some objects? Thanks in advance.