diff --git a/packages/react-native/Libraries/LogBox/__tests__/LogBoxInspectorContainer-test.js b/packages/react-native/Libraries/LogBox/__tests__/LogBoxInspectorContainer-test.js
index 853954e6ebd..8368411158f 100644
--- a/packages/react-native/Libraries/LogBox/__tests__/LogBoxInspectorContainer-test.js
+++ b/packages/react-native/Libraries/LogBox/__tests__/LogBoxInspectorContainer-test.js
@@ -18,9 +18,16 @@ const {
} = require('../LogBoxNotificationContainer');
const React = require('react');
+// Mock `LogBoxLogNotification` because we are interested in snapshotting the
+// behavior of `LogBoxNotificationContainer`, not `LogBoxLogNotification`.
+jest.mock('../UI/LogBoxNotification', () => ({
+ __esModule: true,
+ default: 'LogBoxLogNotification',
+}));
+
describe('LogBoxNotificationContainer', () => {
it('should render null with no logs', () => {
- const output = render.shallowRender(
+ const output = render.create(
,
);
@@ -28,7 +35,7 @@ describe('LogBoxNotificationContainer', () => {
});
it('should render null with no selected log and disabled', () => {
- const output = render.shallowRender(
+ const output = render.create(
{
});
it('should render the latest warning notification', () => {
- const output = render.shallowRender(
+ const output = render.create(
{
});
it('should render the latest error notification', () => {
- const output = render.shallowRender(
+ const output = render.create(
{
});
it('should render both an error and warning notification', () => {
- const output = render.shallowRender(
+ const output = render.create(
{
});
it('should render selected fatal error even when disabled', () => {
- const output = render.shallowRender(
+ const output = render.create(
{
});
it('should render selected syntax error even when disabled', () => {
- const output = render.shallowRender(
+ const output = render.create(