mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
TM iOS: Disable in test environment
Summary: For now, disable TM completely in test environment, like RNTester integration/unit tests. See details in T53341772 This also fixes the failure discussed in https://github.com/facebook/react-native/pull/26151 Reviewed By: PeteTheHeat Differential Revision: D17147915 fbshipit-source-id: 1c48ebb9c3b81fc08bc33606dcc38c29297d6010
This commit is contained in:
@@ -93,6 +93,12 @@ NSString *RCTBridgeModuleNameForClass(Class cls)
|
||||
static BOOL turboModuleEnabled = NO;
|
||||
BOOL RCTTurboModuleEnabled(void)
|
||||
{
|
||||
#if RCT_DEBUG
|
||||
// TODO(T53341772): Allow TurboModule for test environment. Right now this breaks RNTester tests if enabled.
|
||||
if (RCTRunningInTestEnvironment()) {
|
||||
return NO;
|
||||
}
|
||||
#endif
|
||||
return turboModuleEnabled;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user