storage/local.test.ts
2021-06-22 16:10:17 +02:00

21 lines
452 B
TypeScript

import {
basicCheck,
describe,
disableLocalStorage,
expect,
it,
} from "./testing.ts";
import { LocalStorage } from "./local.ts";
describe(LocalStorage, () => {
it("uses localStorage as storage", async () => {
const storage = new LocalStorage();
await basicCheck(storage);
await disableLocalStorage(async () => {
expect(() => new LocalStorage()).toThrow(
"localStorage not available",
);
});
});
});