Skip to content

Commit 67d683a

Browse files
committed
skip rn setup for native tests
1 parent 94ccb35 commit 67d683a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

apps/example/ios/reactnativedeviceactivityexample/AppDelegate.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
#import "AppDelegate.h"
22

3+
34
#import <React/RCTBundleURLProvider.h>
45
#import <React/RCTLinkingManager.h>
56

67
@implementation AppDelegate
78

89
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
910
{
11+
if (NSClassFromString(@"XCTestCase")) {
12+
// Skip React Native setup for unit tests
13+
return YES;
14+
}
15+
1016
self.moduleName = @"main";
1117

1218
// You can add your custom initial props in the dictionary below.

0 commit comments

Comments
 (0)