diff --git a/components/app/__tests__/index.test.tsx b/components/app/__tests__/index.test.tsx
index 7d2d5ebb1168..aafcac03eafb 100644
--- a/components/app/__tests__/index.test.tsx
+++ b/components/app/__tests__/index.test.tsx
@@ -222,13 +222,15 @@ describe('App', () => {
});
it('to false', () => {
+ const warnSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
const { container } = render(
,
);
-
+ expect(warnSpy).not.toHaveBeenCalled();
expect(container.querySelector('.ant-app')).toBeFalsy();
+ warnSpy.mockRestore();
});
});
});
diff --git a/components/app/index.tsx b/components/app/index.tsx
index f595d0aa95cb..03692525280e 100644
--- a/components/app/index.tsx
+++ b/components/app/index.tsx
@@ -74,7 +74,7 @@ const App: React.FC & { useApp: () => useAppProps } = (props) => {
return wrapSSR(
-
+
{ModalContextHolder}
{messageContextHolder}
{notificationContextHolder}