Skip to content

Commit e51227c

Browse files
fkgozalijtreanor
authored andcommitted
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 #26151 Reviewed By: PeteTheHeat Differential Revision: D17147915 fbshipit-source-id: 1c48ebb9c3b81fc08bc33606dcc38c29297d6010
1 parent 3395637 commit e51227c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

React/Base/RCTBridge.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ void RCTRegisterModule(Class moduleClass)
9393
static BOOL turboModuleEnabled = NO;
9494
BOOL RCTTurboModuleEnabled(void)
9595
{
96+
#if RCT_DEBUG
97+
// TODO(T53341772): Allow TurboModule for test environment. Right now this breaks RNTester tests if enabled.
98+
if (RCTRunningInTestEnvironment()) {
99+
return NO;
100+
}
101+
#endif
96102
return turboModuleEnabled;
97103
}
98104

0 commit comments

Comments
 (0)