@@ -68,32 +68,32 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenFileAlreadyExists_doNothing(
68
68
assert_equal ( Pod ::Executable . executed_commands . length , 0 )
69
69
end
70
70
71
- def testCheckAndGenerateEmptyThirdPartyProvider_whenHeaderMissingAndCodegenMissing_raiseError ( )
71
+ def testCheckAndGenerateEmptyThirdPartyProvider_whenHeaderMissingAndCodegenMissing_dontBuildCodegen ( )
72
72
73
73
# Arrange
74
74
FileMock . mocked_existing_files ( [
75
75
@base_path + "/build/" + @third_party_provider_implementation ,
76
76
] )
77
77
78
78
# Act
79
- assert_raise {
79
+ assert_nothing_raised {
80
80
checkAndGenerateEmptyThirdPartyProvider! ( @prefix , false , dir_manager : DirMock , file_manager : FileMock )
81
81
}
82
82
83
83
# Assert
84
84
assert_equal ( Pathname . pwd_invocation_count , 1 )
85
85
assert_equal ( Pod ::Config . instance . installation_root . relative_path_from_invocation_count , 1 )
86
86
assert_equal ( FileMock . exist_invocation_params , [
87
- @prefix + "/React/Fabric/" + @third_party_provider_header
87
+ @prefix + "/React/Fabric/" + @third_party_provider_header ,
88
+ @prefix + "/React/Fabric/tmpSchemaList.txt" ,
88
89
] )
89
90
assert_equal ( DirMock . exist_invocation_params , [
90
91
@base_path + "/" + @prefix + "/../react-native-codegen" ,
91
- @base_path + "/" + @prefix + "/../@react-native/codegen" ,
92
92
] )
93
- assert_equal ( Pod ::UI . collected_messages , [ ] )
93
+ assert_equal ( Pod ::UI . collected_messages , [ "[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider" ] )
94
94
assert_equal ( $collected_commands, [ ] )
95
- assert_equal ( FileMock . open_files . length , 0 )
96
- assert_equal ( Pod ::Executable . executed_commands . length , 0 )
95
+ assert_equal ( FileMock . open_files . length , 1 )
96
+ assert_equal ( Pod ::Executable . executed_commands . length , 1 )
97
97
end
98
98
99
99
def testCheckAndGenerateEmptyThirdPartyProvider_whenImplementationMissingAndCodegenrepoExists_dontBuildCodegen ( )
@@ -145,7 +145,7 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenImplementationMissingAndCode
145
145
146
146
def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen ( )
147
147
# Arrange
148
- codegen_cli_path = @base_path + "/" + @prefix + "/../@ react-native/ codegen"
148
+ codegen_cli_path = @base_path + "/" + @prefix + "/../react-native- codegen"
149
149
DirMock . mocked_existing_dirs ( [
150
150
codegen_cli_path ,
151
151
] )
@@ -160,15 +160,14 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen()
160
160
@prefix + "/React/Fabric/" + @tmp_schema_list_file
161
161
] )
162
162
assert_equal ( DirMock . exist_invocation_params , [
163
- @base_path + "/" + @prefix + "/../react-native-codegen" ,
164
163
codegen_cli_path ,
165
164
codegen_cli_path + "/lib" ,
166
165
] )
167
166
assert_equal ( Pod ::UI . collected_messages , [
168
- "[Codegen] building #{ codegen_cli_path } . " ,
167
+ "[Codegen] building #{ codegen_cli_path } " ,
169
168
"[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider"
170
169
] )
171
- assert_equal ( $collected_commands, [ "~/app/ios/../../../@ react-native/ codegen/scripts/oss/build.sh" ] )
170
+ assert_equal ( $collected_commands, [ "~/app/ios/../../../react-native- codegen/scripts/oss/build.sh" ] )
172
171
assert_equal ( FileMock . open_files [ 0 ] . collected_write , [ "[]" ] )
173
172
assert_equal ( FileMock . open_files [ 0 ] . fsync_invocation_count , 1 )
174
173
assert_equal ( Pod ::Executable . executed_commands [ 0 ] , {
0 commit comments