Skip to content

Commit

Permalink
test: 💍 resize observer polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
prc5 committed Jan 31, 2025
1 parent ab348dc commit 68616a3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ const config: Config.InitialOptions = {
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname",
],
setupFilesAfterEnv: ["jest-extended/all"],
setupFilesAfterEnv: ["jest-extended/all", "<rootDir>/jest.setup.ts"],
};
export default config;
3 changes: 3 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import "jest-extended";

global.ResizeObserver = require("resize-observer-polyfill");
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"react": "*",
"react-dom": "*",
"react-scripts": "5.0.1",
"resize-observer-polyfill": "^1.5.1",
"rollup": "^2.46.0",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-dts": "^3.0.2",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14628,6 +14628,11 @@ requires-port@^1.0.0:
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==

resize-observer-polyfill@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464"
integrity sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==

resolve-cwd@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d"
Expand Down

0 comments on commit 68616a3

Please sign in to comment.