Browse Source

Mock featureFlag in tests

pull/780/head
philon- 11 months ago
parent
commit
b0d51da237
  1. 11
      packages/web/src/core/stores/nodeDBStore/nodeDBStore.test.ts

11
packages/web/src/core/stores/nodeDBStore/nodeDBStore.test.ts

@ -20,6 +20,17 @@ async function freshStore() {
return mod; return mod;
} }
vi.mock("@core/services/featureFlags", () => {
return {
featureFlags: {
get: vi.fn((key: string) => {
if (key === "persistNodeDB") return true;
return false;
}),
},
};
});
function makeNode(num: number, extras: Record<string, any> = {}) { function makeNode(num: number, extras: Record<string, any> = {}) {
return { num, ...extras } as any; return { num, ...extras } as any;
} }

Loading…
Cancel
Save