Closed warent closed 7 years ago
@warent hi!
chrome.storage.local.get
is sinon stub, you should define behavior.
chrome.storage.local.get.yields('result');
// or
chrome.storage.local.get.withArgs('key').yields('value_for_key');
That's it. Sinon is new to me; definitely will do some reading. Thank you for the help :)
I'm testing with Jest 19.0.2, and when I try to use:
chrome.storage.local.get(key, val => console.log(val))
It will never actually execute the anonymous function and log anything. Is this expected behavior?