mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 22:58:19 +00:00
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 {
|
||||
render() {
|
||||
const name = RealComponent.displayName || RealComponent.name;
|
||||
|
||||
return React.createElement(
|
||||
RealComponent.displayName || RealComponent.name,
|
||||
name.replace(/^(RTC|RK)/,''),
|
||||
this.props,
|
||||
this.props.children,
|
||||
);
|
||||
|
@ -132,13 +132,13 @@ const mockNativeModules = {
|
||||
width: 750,
|
||||
},
|
||||
},
|
||||
RCTModalFullscreenView: {
|
||||
ModalFullscreenView: {
|
||||
Constants: {},
|
||||
},
|
||||
RCTScrollView: {
|
||||
ScrollView: {
|
||||
Constants: {},
|
||||
},
|
||||
RCTView: {
|
||||
View: {
|
||||
Constants: {},
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user