mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 11:57:46 +08:00
Changed RUNNING_ON_CI to CI_USE_PACKAGER environment variable.
Reviewed By: javache Differential Revision: D3327726 fbshipit-source-id: 6293b71a2ca7783b089f16fe2089c8893e93a621
This commit is contained in:
committed by
Facebook Github Bot 0
parent
c8f39c3d2c
commit
913b4ccee4
@@ -34,13 +34,15 @@
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
#if RUNNING_ON_CI
|
||||
NSURL *scriptURL = [[NSBundle bundleForClass:[RCTBridge class]] URLForResource:@"main" withExtension:@"jsbundle"];
|
||||
RCTAssert(scriptURL != nil, @"Could not locate main.jsBundle");
|
||||
#else
|
||||
NSString *app = @"Examples/UIExplorer/UIExplorerIntegrationTests/js/IntegrationTestsApp";
|
||||
NSURL *scriptURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://localhost:8081/%@.bundle?platform=ios&dev=true", app]];
|
||||
#endif
|
||||
NSURL *scriptURL;
|
||||
if (getenv("CI_USE_PACKAGER")) {
|
||||
NSString *app = @"Examples/UIExplorer/UIExplorerIntegrationTests/js/IntegrationTestsApp";
|
||||
scriptURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://localhost:8081/%@.bundle?platform=ios&dev=true", app]];
|
||||
RCTAssert(scriptURL != nil, @"No scriptURL set");
|
||||
} else {
|
||||
scriptURL = [[NSBundle bundleForClass:[RCTBridge class]] URLForResource:@"main" withExtension:@"jsbundle"];
|
||||
RCTAssert(scriptURL != nil, @"Could not locate main.jsBundle");
|
||||
}
|
||||
|
||||
_bridge = [[RCTBridge alloc] initWithBundleURL:scriptURL moduleProvider:NULL launchOptions:nil];
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:5];
|
||||
|
||||
Reference in New Issue
Block a user