RN: Delete Shallow Renderer Cases in Image-test.js (#44977)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44977

These Jest unit test cases were making assertions about shallow rendering, but that shallow rendering is now deprecated.

Changelog:
[Internal]

Reviewed By: robhogan

Differential Revision: D58643060

fbshipit-source-id: a61dfcf6cd778a8556aec874fd5e42f8e11f2be2
This commit is contained in:
Tim Yung authored and Facebook GitHub Bot committed 2024-06-16 12:15:49 -07:00
1 parent 02dfbeaaeb
commit 19dc990aa1
2 files changed
+3 -41

No files matched your search

@@ -16,7 +16,7 @@ const View = require('../../Components/View/View');
const Modal = require('../Modal');
const React = require('react');
describe('<Modal />', () => {
describe('Modal', () => {
it('should render as <Modal> when mocked', () => {
const instance = render.create(
<Modal>
@@ -35,26 +35,6 @@ describe('<Modal />', () => {
expect(instance.toJSON()).toBeNull();
});
it('should shallow render as <Modal> when mocked', () => {
const output = render.shallow(
<Modal>
<View />
</Modal>,
);
expect(output).toMatchSnapshot();
});
it('should shallow render as <Modal> when not mocked', () => {
jest.dontMock('../Modal');
const output = render.shallow(
<Modal>
<View />
</Modal>,
);
expect(output).toMatchSnapshot();
});
it('should render as <RCTModalHostView> when not mocked', () => {
jest.dontMock('../Modal');
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<Modal /> should render as <Modal> when mocked 1`] = `
exports[`Modal should render as <Modal> when mocked 1`] = `
<Modal
hardwareAccelerated={false}
visible={true}
@@ -9,7 +9,7 @@ exports[`<Modal /> should render as <Modal> when mocked 1`] = `
</Modal>
`;
exports[`<Modal /> should render as <RCTModalHostView> when not mocked 1`] = `
exports[`Modal should render as <RCTModalHostView> when not mocked 1`] = `
<RCTModalHostView
animationType="none"
hardwareAccelerated={false}
@@ -62,21 +62,3 @@ exports[`<Modal /> should render as <RCTModalHostView> when not mocked 1`] = `
</View>
</RCTModalHostView>
`;
exports[`<Modal /> should shallow render as <Modal> when mocked 1`] = `
<Modal
hardwareAccelerated={false}
visible={true}
>
<View />
</Modal>
`;
exports[`<Modal /> should shallow render as <Modal> when not mocked 1`] = `
<Modal
hardwareAccelerated={false}
visible={true}
>
<View />
</Modal>
`;