1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Mock ResizeObserver

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-03-16 07:40:28 +03:00
parent 6605bfff0a
commit c6d00bc224

View File

@ -39,6 +39,14 @@ jest.mock("electron", () => ({
},
}));
Object.defineProperty(window, "ResizeObserver", {
writable: true,
value: jest.fn().mockImplementation(() => ({
observe: jest.fn(),
disconnect: jest.fn(),
})),
});
const initialTabs: DockTab[] = [
{ id: "terminal", kind: TabKind.TERMINAL, title: "Terminal", pinned: false },
{ id: "create", kind: TabKind.CREATE_RESOURCE, title: "Create resource", pinned: false },