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 committed Dec 4, 2022
1 parent 92587ce commit 9d7a807
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 9d7a807

Please sign in to comment.