diff --git a/packages/react-native-web/src/exports/Platform/index.js b/packages/react-native-web/src/exports/Platform/index.js index 7df291c56..d7c8f766f 100644 --- a/packages/react-native-web/src/exports/Platform/index.js +++ b/packages/react-native-web/src/exports/Platform/index.js @@ -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;