Skip to content

Commit

Permalink
TM iOS: Disable in test environment
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fkgozali authored and facebook-github-bot committed Sep 4, 2019
1 parent 7715d18 commit 241091d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions React/Base/RCTBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ void RCTRegisterModule(Class moduleClass)
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;
}

Expand Down

0 comments on commit 241091d

Please sign in to comment.