Fix for Image displayName, currently displaying as <Component> in tests (#23287)

Summary:
As per https://github.com/facebook/react-native/issues/21937, Image `displayName` is not set. This means it comes through as `<Component>` in tests.

[General][fixed] - fix `displayName` for `Image`
Pull Request resolved: https://github.com/facebook/react-native/pull/23287

Differential Revision: D13941744

Pulled By: cpojer

fbshipit-source-id: eab161eee415ec4f7207efcd5c6e2a4bbe67dfe1
This commit is contained in:
Sam Linnett 2019-02-04 07:35:16 -08:00 committed by Facebook Github Bot
parent c7b57f1986
commit 4989123f8c
2 changed files with 2 additions and 0 deletions

View File

@ -259,6 +259,7 @@ let Image = (
}; };
Image = React.forwardRef(Image); Image = React.forwardRef(Image);
Image.displayName = 'Image';
/** /**
* Retrieve the width and height (in pixels) of an image prior to displaying it * Retrieve the width and height (in pixels) of an image prior to displaying it

View File

@ -124,6 +124,7 @@ let Image = (
}; };
Image = React.forwardRef(Image); Image = React.forwardRef(Image);
Image.displayName = 'Image';
/** /**
* Retrieve the width and height (in pixels) of an image prior to displaying it. * Retrieve the width and height (in pixels) of an image prior to displaying it.