mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
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:
3 files changed
+34
No files matched your search
@@ -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");
|
||||
Reference in new issue
Block a user