Skip to content

Commit

Permalink
fix(admin-ui): resolve ResizeObserver error on jest test
Browse files Browse the repository at this point in the history
  • Loading branch information
jv18creator committed Aug 15, 2023
1 parent 688d5d7 commit 7a4bb7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions admin-ui/__tests__/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jest.setTimeout(30000);
HTMLAnchorElement.prototype.click = jest.fn();
global.window.URL.createObjectURL = jest.fn();
// Polyfill "window.fetch" used in the React component.
global.ResizeObserver = require('resize-observer-polyfill')
import 'whatwg-fetch'
import '@testing-library/jest-dom'

Expand Down
3 changes: 2 additions & 1 deletion admin-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"purgecss-webpack-plugin": "^5.0.0",
"raw-loader": "^4.0.2",
"redux-saga-test-plan": "^4.0.6",
"resize-observer-polyfill": "^1.5.1",
"rimraf": "^4.4.1",
"sass-loader": "^13.2.2",
"style-loader": "^3.3.2",
Expand Down Expand Up @@ -153,7 +154,7 @@
"react-text-mask": "^5.5.0",
"react-toastify": "^9.1.2",
"react-toggle": "^4.1.3",
"react-tooltip": "^5.10.5",
"react-tooltip": "^5.20.0",
"reactstrap": "^9.1.8",
"recharts": "^2.5.0",
"redux-persist": "^6.0.0",
Expand Down

0 comments on commit 7a4bb7b

Please sign in to comment.