Skip to content

Commit

Permalink
fix(Jest): Added polyfill for ResizeObserver in Jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Pinedo committed Oct 30, 2023
1 parent 506bf83 commit d7baa52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"react-dom": "^18.2.0",
"react-syntax-highlighter": "^15.5.0",
"release-it": "^16.1.5",
"resize-observer-polyfill": "^1.5.1",
"rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.68.0",
"storybook": "^7.4.3",
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/components/Panel/Panel.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import * as React from 'react';
import { render } from 'test-utils';
import { Panel } from './Panel';
import ResizeObserver from 'resize-observer-polyfill';
global.ResizeObserver = ResizeObserver;

describe('Panel', () => {
test('Simple render', () => {
Expand Down

0 comments on commit d7baa52

Please sign in to comment.