mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
expose IS_TESTING for Platform module
Summary: Introduced IS_TESTING flag on Platform module for android as well. This is useful for testing environment. Reviewed By: mmmulani Differential Revision: D4429662 fbshipit-source-id: 33711d7fb5666f0bac8aee444b71261f7f12770f
This commit is contained in:
committed by
Facebook Github Bot
parent
dd8231ad63
commit
06956e83cd
@@ -18,6 +18,10 @@ const Platform = {
|
||||
const AndroidConstants = require('NativeModules').AndroidConstants;
|
||||
return AndroidConstants && AndroidConstants.Version;
|
||||
},
|
||||
get isTesting(): boolean {
|
||||
const constants = require('NativeModules').AndroidConstants;
|
||||
return constants && constants.isTesting;
|
||||
},
|
||||
select: (obj: Object) => obj.android,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user