Skip to content

Commit

Permalink
fix assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamlangford committed Apr 30, 2024
1 parent 16d4b49 commit fadcf18
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 1 addition & 8 deletions src/store/enterprise/managedStorage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ beforeEach(async () => {
describe("readManagedStorage", () => {
it("reads immediately if managed storage is already initialized", async () => {
await initializationTimestamp.set(new Date().toISOString() as Timestamp);
await expect(readManagedStorage()).resolves.toStrictEqual({
// `jest-webextension-mock`'s storage is shared across sources, the call ends up with the managed storage
// and the local storage mixed together. See https://github.com/clarkbw/jest-webextension-mock/issues/183
managedStorageInitTimestamp: expect.any(String),
});
await expect(readManagedStorage()).resolves.toStrictEqual({});

// Should only be called once vs. polling
expect(browser.storage.managed.get).toHaveBeenCalledOnce();
Expand All @@ -49,9 +45,6 @@ describe("readManagedStorage", () => {
it("reads managed storage", async () => {
await browser.storage.managed.set({ partnerId: "taco-bell" });
await expect(readManagedStorage()).resolves.toStrictEqual({
// `jest-webextension-mock`'s storage is shared across sources, the call ends up with the managed storage
// and the local storage mixed together. See https://github.com/clarkbw/jest-webextension-mock/issues/183
managedStorageInitTimestamp: expect.any(String),
partnerId: "taco-bell",
});
});
Expand Down
3 changes: 0 additions & 3 deletions src/store/enterprise/useManagedStorageState.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ describe("useManagedStorageState", () => {

expect(result.current).toStrictEqual({
data: {
// `jest-webextension-mock`'s storage is shared across sources, the call ends up with the managed storage
// and the local storage mixed together. See https://github.com/clarkbw/jest-webextension-mock/issues/183
managedStorageInitTimestamp: expect.any(String),
partnerId: "taco-bell",
},
isLoading: false,
Expand Down

0 comments on commit fadcf18

Please sign in to comment.