From 77b441249a212f5dc3b0de282c2a7de75f28cb5d Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Sun, 16 Jun 2024 12:15:49 -0700 Subject: [PATCH] RN: Delete Shallow Renderer Cases in `InputAccessoryView-test.js` (#44975) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44975 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: D58643064 fbshipit-source-id: 19cb05df25b4b92ee584ea126d238276f5b214f7 --- .../__tests__/InputAccessoryView-test.js | 22 +------------------ .../InputAccessoryView-test.js.snap | 20 ++--------------- 2 files changed, 3 insertions(+), 39 deletions(-) diff --git a/packages/react-native/Libraries/Components/TextInput/__tests__/InputAccessoryView-test.js b/packages/react-native/Libraries/Components/TextInput/__tests__/InputAccessoryView-test.js index 9777451295d..97319e3e493 100644 --- a/packages/react-native/Libraries/Components/TextInput/__tests__/InputAccessoryView-test.js +++ b/packages/react-native/Libraries/Components/TextInput/__tests__/InputAccessoryView-test.js @@ -16,7 +16,7 @@ const View = require('../../View/View'); const InputAccessoryView = require('../InputAccessoryView').default; const React = require('react'); -describe('', () => { +describe('InputAccessoryView', () => { it('should render as when mocked', () => { const instance = render.create( @@ -26,26 +26,6 @@ describe('', () => { expect(instance).toMatchSnapshot(); }); - it('should shallow render as when mocked', () => { - const output = render.shallow( - - - , - ); - expect(output).toMatchSnapshot(); - }); - - it('should shallow render as when not mocked', () => { - jest.dontMock('../InputAccessoryView'); - - const output = render.shallow( - - - , - ); - expect(output).toMatchSnapshot(); - }); - it('should render as when not mocked', () => { jest.dontMock('../InputAccessoryView'); diff --git a/packages/react-native/Libraries/Components/TextInput/__tests__/__snapshots__/InputAccessoryView-test.js.snap b/packages/react-native/Libraries/Components/TextInput/__tests__/__snapshots__/InputAccessoryView-test.js.snap index 8ed62dfea9d..b9201d10116 100644 --- a/packages/react-native/Libraries/Components/TextInput/__tests__/__snapshots__/InputAccessoryView-test.js.snap +++ b/packages/react-native/Libraries/Components/TextInput/__tests__/__snapshots__/InputAccessoryView-test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` should render as when mocked 1`] = ` +exports[`InputAccessoryView should render as when mocked 1`] = ` should render as when mo `; -exports[` should render as when not mocked 1`] = ` +exports[`InputAccessoryView should render as when not mocked 1`] = ` should render as when no `; - -exports[` should shallow render as when mocked 1`] = ` - - - -`; - -exports[` should shallow render as when not mocked 1`] = ` - - - -`;