Skip to content

Commit 48d0a6b

Browse files
author
Chris Brody
authored
Merge pull request #88 from brodybits/cover-extra-breaking-mutations
Add tests to cover extra breaking mutations
2 parents cf8c1c6 + fab1f62 commit 48d0a6b

File tree

12 files changed

+2490
-47
lines changed

12 files changed

+2490
-47
lines changed

tests/with-injection/create/with-example/with-options/__snapshots__/create-with-example-with-options.test.js.snap

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ Pod::Spec.new do |s|
451451
s.requires_arc = true
452452
453453
s.dependency \\"React\\"
454-
454+
s.dependency 'AFNetworking', '~> 3.0'
455455
# s.dependency \\"...\\"
456456
end
457457
@@ -474,6 +474,7 @@ content:
474474
--------
475475
#import \\"AliceBobbi.h\\"
476476
477+
#import <AFNetworking/AFNetworking.h>
477478
478479
@implementation AliceBobbi
479480
@@ -482,7 +483,13 @@ RCT_EXPORT_MODULE()
482483
RCT_EXPORT_METHOD(sampleMethod:(NSString *)stringArgument numberParameter:(nonnull NSNumber *)numberArgument callback:(RCTResponseSenderBlock)callback)
483484
{
484485
// TODO: Implement some actually useful functionality
485-
callback(@[[NSString stringWithFormat: @\\"numberArgument: %@ stringArgument: %@\\", numberArgument, stringArgument]]);
486+
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
487+
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@\\"text/plain\\"];
488+
[manager GET:@\\"https://httpstat.us/200\\" parameters:nil progress:nil success:^(NSURLSessionTask *task, id responseObject) {
489+
callback(@[[NSString stringWithFormat: @\\"numberArgument: %@ stringArgument: %@ resp: %@\\", numberArgument, stringArgument, responseObject]]);
490+
} failure:^(NSURLSessionTask *operation, NSError *error) {
491+
callback(@[[NSString stringWithFormat: @\\"numberArgument: %@ stringArgument: %@ err: %@\\", numberArgument, stringArgument, error]]);
492+
}];
486493
}
487494
488495
@end
@@ -782,6 +789,8 @@ content:
782789
"* execa.commandSync command: react-native init test-demo --version [email protected] options: {\\"cwd\\":\\"./react-native-alice-bobbi\\",\\"stdio\\":\\"inherit\\"}
783790
",
784791
"* ensureDir dir: react-native-alice-bobbi/scripts/
792+
",
793+
"* ensureDir dir: react-native-alice-bobbi/test-demo/ios/
785794
",
786795
"* ensureDir dir: react-native-alice-bobbi/test-demo/
787796
",
@@ -900,6 +909,43 @@ content:
900909
removeLibraryNpmIgnorePaths(npmIgnorePath, libraryNodeModulesPath);
901910
})();
902911
912+
<<<<<<<< ======== >>>>>>>>
913+
",
914+
"* outputFile name: react-native-alice-bobbi/test-demo/ios/Podfile
915+
content:
916+
--------
917+
platform :ios, '10.0'
918+
919+
target 'test-demo' do
920+
rn_path = '../node_modules/react-native'
921+
922+
pod 'yoga', path: \\"#{rn_path}/ReactCommon/yoga/yoga.podspec\\"
923+
pod 'DoubleConversion', :podspec => \\"#{rn_path}/third-party-podspecs/DoubleConversion.podspec\\"
924+
pod 'Folly', :podspec => \\"#{rn_path}/third-party-podspecs/Folly.podspec\\"
925+
pod 'glog', :podspec => \\"#{rn_path}/third-party-podspecs/GLog.podspec\\"
926+
pod 'React', path: rn_path, subspecs: [
927+
'Core',
928+
'CxxBridge',
929+
'RCTAnimation',
930+
'RCTActionSheet',
931+
'RCTImage',
932+
'RCTLinkingIOS',
933+
'RCTNetwork',
934+
'RCTSettings',
935+
'RCTText',
936+
'RCTVibration',
937+
'RCTWebSocket',
938+
'RCTPushNotification',
939+
'RCTCameraRoll',
940+
'RCTSettings',
941+
'RCTBlob',
942+
'RCTGeolocation',
943+
'DevSupport'
944+
]
945+
946+
pod 'react-native-alice-bobbi', :path => '../../react-native-alice-bobbi.podspec'
947+
end
948+
903949
<<<<<<<< ======== >>>>>>>>
904950
",
905951
"* outputFile name: react-native-alice-bobbi/test-demo/App.js

tests/with-injection/create/with-example/with-options/create-with-example-with-options.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ test('create alice-bobbi module with example, with config options', () => {
1616
generateExample: true,
1717
exampleName: 'test-demo',
1818
exampleReactNativeVersion: '[email protected]',
19+
useCocoapods: true
1920
};
2021

2122
return lib(options, inject)

0 commit comments

Comments
 (0)