Workaround native module dependency in Jest environment
Reviewed By: josephsavona Differential Revision: D4225750 fbshipit-source-id: 6ac5a5cc1869232861977ea214970804acd7e39d
This commit is contained in:
parent
90284eb67d
commit
be5868dddb
|
@ -15,7 +15,8 @@
|
|||
var Platform = {
|
||||
OS: 'android',
|
||||
get Version() {
|
||||
return require('NativeModules').AndroidConstants.Version;
|
||||
const AndroidConstants = require('NativeModules').AndroidConstants;
|
||||
return AndroidConstants && AndroidConstants.Version;
|
||||
},
|
||||
select: (obj: Object) => obj.android,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue