1// Copyright 2015-present 650 Industries. All rights reserved.
2
3#import "RCTTestRunner.h"
4#import "RCTAssert.h"
5
6#import <XCTest/XCTest.h>
7
8@interface ExponentIntegrationTests : XCTestCase
9
10@end
11
12@implementation ExponentIntegrationTests
13{
14  RCTTestRunner *_runner;
15}
16
17- (void)setUp
18{
19  [super setUp];
20
21#if __LP64__
22  RCTAssert(NO, @"Tests should be run on 32-bit device simulators (e.g. iPhone 5)");
23#endif
24
25  NSOperatingSystemVersion version = [NSProcessInfo processInfo].operatingSystemVersion;
26  RCTAssert((version.majorVersion == 8 && version.minorVersion >= 3) || version.majorVersion >= 9, @"Tests should be run on iOS 8.3+, found %zd.%zd.%zd", version.majorVersion, version.minorVersion, version.patchVersion);
27
28  NSArray<id<RCTBridgeModule>> *(^testModuleProvider)(void) = ^NSArray<id<RCTBridgeModule>> *(void) {
29    // TODO: get the contents of EXVersionManager::versionedModulesForKernel in here
30    return @[];
31  };
32  _runner = RCTInitRunnerForApp(@"ExponentTestsApp", testModuleProvider);
33}
34
35- (void)testFrameLoadCuriousPeople
36{
37  [_runner runTest:_cmd
38            module:@"FrameTests"
39      initialProps:@{@"manifestUrl": @"exp://exp.host/@exponent/react-native-for-curious-people"}
40configurationBlock:nil];
41}
42
43- (void)testFrameLoadFeaturedExperience
44{
45  [_runner runTest:_cmd
46            module:@"FrameTests"
47      initialProps:@{@"loadFeaturedExperience": @YES}
48configurationBlock:nil];
49}
50
51@end
52