Skip to content

Commit 12beb68

Browse files
committed
chore: Test mock should also update getPopupContainer
1 parent c7811aa commit 12beb68

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/mock.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@ import { generateTrigger } from './index';
44
interface MockPortalProps {
55
didUpdate: () => void;
66
children: React.ReactElement;
7+
getContainer: () => HTMLElement;
78
}
89

9-
const MockPortal: React.FC<MockPortalProps> = ({ didUpdate, children }) => {
10+
const MockPortal: React.FC<MockPortalProps> = ({
11+
didUpdate,
12+
children,
13+
getContainer,
14+
}) => {
1015
React.useEffect(() => {
1116
didUpdate();
17+
getContainer();
1218
});
1319

1420
return children;

0 commit comments

Comments
 (0)