9 lines
413 B
TypeScript
9 lines
413 B
TypeScript
import { expect, test } from "bun:test";
|
|
import { openHistory } from "../src/web/history-db";
|
|
|
|
test("no IndexedDB, or a browser that refuses it: the page runs without history", async () => {
|
|
expect(await openHistory(undefined)).toBeNull();
|
|
const refusing = { open: () => { throw new DOMException("blocked", "SecurityError"); } } as unknown as IDBFactory;
|
|
expect(await openHistory(refusing)).toBeNull();
|
|
});
|