diff --git a/packages/react-native/Libraries/LogBox/UI/__tests__/LogBoxInspectorMessageHeader-test.js b/packages/react-native/Libraries/LogBox/UI/__tests__/LogBoxInspectorMessageHeader-test.js index 078f582015e2..287b185dae5f 100644 --- a/packages/react-native/Libraries/LogBox/UI/__tests__/LogBoxInspectorMessageHeader-test.js +++ b/packages/react-native/Libraries/LogBox/UI/__tests__/LogBoxInspectorMessageHeader-test.js @@ -16,9 +16,16 @@ const LogBoxInspectorMessageHeader = require('../LogBoxInspectorMessageHeader').default; const React = require('react'); +// Mock `LogBoxMessage` because we are interested in snapshotting the +// behavior of `LogBoxInspectorMessageHeader`, not `LogBoxMessage`. +jest.mock('../LogBoxMessage', () => ({ + __esModule: true, + default: 'LogBoxMessage', +})); + describe('LogBoxInspectorMessageHeader', () => { it('should render error', () => { - const output = render.shallowRender( + const output = render.create( { }); it('should render fatal', () => { - const output = render.shallowRender( + const output = render.create( { }); it('should render syntax error', () => { - const output = render.shallowRender( + const output = render.create( { }); it('should not render See More button for short content', () => { - const output = render.shallowRender( + const output = render.create( { }); it('should not render "See More" if expanded', () => { - const output = render.shallowRender( + const output = render.create( { }); it('should render "See More" if collapsed', () => { - const output = render.shallowRender( + const output = render.create( ({ + __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(