Fixes Components with prefixes in mock
Reviewed By: bestander Differential Revision: D4096027 fbshipit-source-id: 342677a27c6d03dc7d2d6eb53970a504fb62d63b
This commit is contained in:
parent
4cff039d78
commit
45275e30b9
|
@ -13,8 +13,10 @@ module.exports = moduleName => {
|
||||||
|
|
||||||
const Component = class extends RealComponent {
|
const Component = class extends RealComponent {
|
||||||
render() {
|
render() {
|
||||||
|
const name = RealComponent.displayName || RealComponent.name;
|
||||||
|
|
||||||
return React.createElement(
|
return React.createElement(
|
||||||
RealComponent.displayName || RealComponent.name,
|
name.replace(/^(RTC|RK)/,''),
|
||||||
this.props,
|
this.props,
|
||||||
this.props.children,
|
this.props.children,
|
||||||
);
|
);
|
||||||
|
|
|
@ -132,13 +132,13 @@ const mockNativeModules = {
|
||||||
width: 750,
|
width: 750,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
RCTModalFullscreenView: {
|
ModalFullscreenView: {
|
||||||
Constants: {},
|
Constants: {},
|
||||||
},
|
},
|
||||||
RCTScrollView: {
|
ScrollView: {
|
||||||
Constants: {},
|
Constants: {},
|
||||||
},
|
},
|
||||||
RCTView: {
|
View: {
|
||||||
Constants: {},
|
Constants: {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue