mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
18 lines
507 B
TypeScript
18 lines
507 B
TypeScript
import "@testing-library/jest-dom";
|
|
import { IDBFactory } from "fake-indexeddb";
|
|
import { afterAll, afterEach, beforeAll } from "vitest";
|
|
import { server } from "./mocks/server";
|
|
|
|
/**
|
|
* faking indexeddb in memory for testing crypto key storage
|
|
*/
|
|
Object.defineProperty(globalThis, "indexedDB", {
|
|
value: new IDBFactory(),
|
|
writable: true,
|
|
configurable: true,
|
|
});
|
|
|
|
beforeAll(() => server.listen({ onUnhandledRequest: "warn" }));
|
|
afterEach(() => server.resetHandlers());
|
|
afterAll(() => server.close());
|