`chrome.alarms.getAll()` returns `undefined` instead of array of alarms
opened this issue · comments
Deleted user commented
chrome.alarms.getAll()
should return an array of alarms. However, it is returning undefined
using v3.0.1.
const chrome = require("sinon-chrome/extensions");
(async () => {
let alarms = await chrome.alarms.getAll();
console.log(alarms); // `undefined`
await chrome.alarms.create("testAlarm", {
delayInMinutes: 15
});
alarms = await chrome.alarms.getAll();
console.log(alarms); // `undefined`
let alarm = await chrome.alarms.get("testAlarm");
console.log(alarm); // `undefined`
})();
Deleted user commented
Apologies. I did not realize these were API stubs, not for faking behavior.
jinzhanglin commented
Apologies. I did not realize these were API stubs, not for faking behavior.
so, is that all of the returning should be mocked by self?
And all of the returning should be mocked by .returns()
? is it right? thanks