summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/test/unit/lib/ActivityStreamStorage.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/newtab/test/unit/lib/ActivityStreamStorage.test.js')
-rw-r--r--browser/components/newtab/test/unit/lib/ActivityStreamStorage.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/browser/components/newtab/test/unit/lib/ActivityStreamStorage.test.js b/browser/components/newtab/test/unit/lib/ActivityStreamStorage.test.js
index 0b8baef762..fd56a3e185 100644
--- a/browser/components/newtab/test/unit/lib/ActivityStreamStorage.test.js
+++ b/browser/components/newtab/test/unit/lib/ActivityStreamStorage.test.js
@@ -47,6 +47,7 @@ describe("ActivityStreamStorage", () => {
beforeEach(() => {
storeStub = {
getAll: sandbox.stub().resolves(),
+ getAllKeys: sandbox.stub().resolves(),
get: sandbox.stub().resolves(),
put: sandbox.stub().resolves(),
};
@@ -75,6 +76,14 @@ describe("ActivityStreamStorage", () => {
assert.calledOnce(storeStub.getAll);
assert.deepEqual(result, ["bar"]);
});
+ it("should return the correct value for getAllKeys", async () => {
+ storeStub.getAllKeys.resolves(["key1", "key2", "key3"]);
+
+ const result = await testStorage.getAllKeys();
+
+ assert.calledOnce(storeStub.getAllKeys);
+ assert.deepEqual(result, ["key1", "key2", "key3"]);
+ });
it("should query the correct object store", async () => {
await testStorage.get();