Skip to content

Commit b9a7c2a

Browse files
committed
Fix panel tests
1 parent 7752d3e commit b9a7c2a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/code-editor/src/Panel/Panel.spec.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ import { PanelProps } from './Panel.types';
77

88
// Mock Modal component to avoid HTMLDialogElement issues
99
jest.mock('@leafygreen-ui/modal', () => {
10-
return function MockModal({ children, open, ...props }: any) {
10+
const MockModal = function ({ children, open, ...props }: any) {
1111
return open ? (
1212
<div data-testid="mock-modal" {...props}>
1313
{children}
1414
</div>
1515
) : null;
1616
};
17+
18+
return {
19+
__esModule: true,
20+
default: MockModal,
21+
Modal: MockModal,
22+
};
1723
});
1824

1925
const TestIcon = () => <div data-testid="test-icon" />;

0 commit comments

Comments
 (0)