mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Migrate LogBoxNotificationContainer-test.js from Shallow Renderer (#44981)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44981 Migrates this Jest unit test away from using `react-shallow-renderer` because it is no longer recommended. Changelog: [Internal] Reviewed By: robhogan Differential Revision: D58643062 fbshipit-source-id: 6d7bba78945509bbb6bdab1e6347ba0d90343ec3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
86a48c4118
commit
f294bd8223
+8
-1
@@ -18,9 +18,16 @@ const {
|
||||
} = require('../LogBoxInspectorContainer');
|
||||
const React = require('react');
|
||||
|
||||
// Mock `LogBoxInspector` because we are interested in snapshotting the behavior
|
||||
// of `LogBoxNotificationContainer`, not `LogBoxInspector`.
|
||||
jest.mock('../UI/LogBoxInspector', () => ({
|
||||
__esModule: true,
|
||||
default: 'LogBoxInspector',
|
||||
}));
|
||||
|
||||
describe('LogBoxNotificationContainer', () => {
|
||||
it('should render inspector with logs, even when disabled', () => {
|
||||
const output = render.shallowRender(
|
||||
const output = render.create(
|
||||
<LogBoxInspectorContainer
|
||||
isDisabled
|
||||
selectedLogIndex={-1}
|
||||
|
||||
Reference in New Issue
Block a user