mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Delete Shallow Renderer Cases in Modal-test.js (#44970)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44970 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: D58643058 fbshipit-source-id: 75c95b3ef8f9c481b50d90bf195ba3bd90196f0b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
77b441249a
commit
02dfbeaaeb
@@ -22,24 +22,12 @@ const Image = require('../Image');
|
||||
const ImageInjection = require('../ImageInjection');
|
||||
const React = require('react');
|
||||
|
||||
describe('<Image />', () => {
|
||||
describe('Image', () => {
|
||||
it('should render as <Image> when mocked', () => {
|
||||
const instance = render.create(<Image source={{uri: 'foo-bar.jpg'}} />);
|
||||
expect(instance).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should shallow render as <Image> when mocked', () => {
|
||||
const output = render.shallow(<Image source={{uri: 'foo-bar.jpg'}} />);
|
||||
expect(output).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should shallow render as <ForwardRef(Image)> when not mocked', () => {
|
||||
jest.dontMock('../Image');
|
||||
|
||||
const output = render.shallow(<Image source={{uri: 'foo-bar.jpg'}} />);
|
||||
expect(output).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it('should render as <RCTImageView> when not mocked', () => {
|
||||
jest.dontMock('../Image');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<Image /> should render as <Image> when mocked 1`] = `
|
||||
exports[`Image should render as <Image> when mocked 1`] = `
|
||||
<Image
|
||||
source={
|
||||
Object {
|
||||
@@ -10,7 +10,7 @@ exports[`<Image /> should render as <Image> when mocked 1`] = `
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Image /> should render as <RCTImageView> when not mocked 1`] = `
|
||||
exports[`Image should render as <RCTImageView> when not mocked 1`] = `
|
||||
<RCTImageView
|
||||
accessibilityState={
|
||||
Object {
|
||||
@@ -39,23 +39,3 @@ exports[`<Image /> should render as <RCTImageView> when not mocked 1`] = `
|
||||
}
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Image /> should shallow render as <ForwardRef(Image)> when not mocked 1`] = `
|
||||
<Image
|
||||
source={
|
||||
Object {
|
||||
"uri": "foo-bar.jpg",
|
||||
}
|
||||
}
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`<Image /> should shallow render as <Image> when mocked 1`] = `
|
||||
<Image
|
||||
source={
|
||||
Object {
|
||||
"uri": "foo-bar.jpg",
|
||||
}
|
||||
}
|
||||
/>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user