1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/common/__tests__/hotbar-store.test.ts
Jari Kolehmainen 8d42d40433
fix initial hotbar not showing (#2551)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-04-20 09:09:13 +03:00

21 lines
460 B
TypeScript

import mockFs from "mock-fs";
import { HotbarStore, hotbarStore } from "../hotbar-store";
describe("HotbarStore", () => {
beforeEach(() => {
HotbarStore.resetInstance();
mockFs({ tmp: { "lens-hotbar-store.json": "{}" } });
});
afterEach(() => {
mockFs.restore();
});
describe("load", () => {
it("loads one hotbar by default", () => {
hotbarStore.load();
expect(hotbarStore.hotbars.length).toEqual(1);
});
});
});