Add mocks for monaco editor and virtualized auto sizer to allow components to be rendered in unit tests

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen committed 2022-07-18 15:51:18 +03:00
1 parent da6eee05a6
commit 1797f910f2
3 files changed
+34

No files matched your search

+8
View File
@@ -36,3 +36,11 @@ process.on("unhandledRejection", (err: any) => {
global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoderNode as unknown as typeof TextDecoder;
global.ResizeObserver = class {
observe = () => {};
unobserve = () => {};
disconnect = () => {};
};
jest.mock("./renderer/components/monaco-editor/monaco-editor");