mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-08-15 18:45:06 +00:00
[add] Platform.isTesting
This commit is contained in:
+7
-1
@@ -10,7 +10,13 @@
|
||||
|
||||
const Platform = {
|
||||
OS: 'web',
|
||||
select: (obj: Object) => ('web' in obj ? obj.web : obj.default)
|
||||
select: (obj: Object) => ('web' in obj ? obj.web : obj.default),
|
||||
get isTesting(): boolean {
|
||||
if (process.env.NODE_DEV === 'test') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export default Platform;
|
||||
|
||||
Reference in New Issue
Block a user