Skip to content

Commit

Permalink
chore: add resize observer mock
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Mineev authored and umputun committed Dec 5, 2022
1 parent 050bce1 commit 8d95baa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frontend/apps/remark42/app/__mocks__/resize-observer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
global.ResizeObserver = class ResizeObserver {
observe() {
// do nothing
}
unobserve() {
// do nothing
}
disconnect() {
// do nothing
}
};
1 change: 1 addition & 0 deletions frontend/apps/remark42/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const config: Config = {
setupFilesAfterEnv: [
'<rootDir>/app/__mocks__/fetch.ts',
'<rootDir>/app/__mocks__/localstorage.ts',
'<rootDir>/app/__mocks__/resize-observer.ts',
'<rootDir>/app/__stubs__/remark-config.ts',
'<rootDir>/app/__stubs__/static-config.ts',
],
Expand Down

0 comments on commit 8d95baa

Please sign in to comment.