diff --git a/frontend/apps/remark42/app/__mocks__/resize-observer.ts b/frontend/apps/remark42/app/__mocks__/resize-observer.ts new file mode 100644 index 0000000000..bdee163b56 --- /dev/null +++ b/frontend/apps/remark42/app/__mocks__/resize-observer.ts @@ -0,0 +1,11 @@ +global.ResizeObserver = class ResizeObserver { + observe() { + // do nothing + } + unobserve() { + // do nothing + } + disconnect() { + // do nothing + } +}; diff --git a/frontend/apps/remark42/jest.config.ts b/frontend/apps/remark42/jest.config.ts index ad822e48a7..4d9f28a94c 100644 --- a/frontend/apps/remark42/jest.config.ts +++ b/frontend/apps/remark42/jest.config.ts @@ -33,6 +33,7 @@ const config: Config = { setupFilesAfterEnv: [ '/app/__mocks__/fetch.ts', '/app/__mocks__/localstorage.ts', + '/app/__mocks__/resize-observer.ts', '/app/__stubs__/remark-config.ts', '/app/__stubs__/static-config.ts', ],