@@ -68,32 +68,34 @@ 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
- @base_path + "/" + @prefix + "/React/Fabric/" + @third_party_provider_header
87
+ @base_path + "/" + @prefix + "/React/Fabric/" + @third_party_provider_header ,
88
+ @base_path + "/" + @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 , [
94
+ "[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider" ,
95
+ ] )
94
96
assert_equal ( $collected_commands, [ ] )
95
- assert_equal ( FileMock . open_files . length , 0 )
96
- assert_equal ( Pod ::Executable . executed_commands . length , 0 )
97
+ assert_equal ( FileMock . open_files . length , 1 )
98
+ assert_equal ( Pod ::Executable . executed_commands . length , 1 )
97
99
end
98
100
99
101
def testCheckAndGenerateEmptyThirdPartyProvider_whenImplementationMissingAndCodegenrepoExists_dontBuildCodegen ( )
@@ -145,7 +147,7 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenImplementationMissingAndCode
145
147
146
148
def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen ( )
147
149
# Arrange
148
- codegen_cli_path = @base_path + "/" + @prefix + "/../@ react-native/ codegen"
150
+ codegen_cli_path = @base_path + "/" + @prefix + "/../react-native- codegen"
149
151
DirMock . mocked_existing_dirs ( [
150
152
codegen_cli_path ,
151
153
] )
@@ -160,15 +162,14 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen()
160
162
@base_path + "/" + @prefix + "/React/Fabric/" + @tmp_schema_list_file
161
163
] )
162
164
assert_equal ( DirMock . exist_invocation_params , [
163
- @base_path + "/" + @prefix + "/../react-native-codegen" ,
164
165
codegen_cli_path ,
165
166
codegen_cli_path + "/lib" ,
166
167
] )
167
168
assert_equal ( Pod ::UI . collected_messages , [
168
- "[Codegen] building #{ codegen_cli_path } . " ,
169
+ "[Codegen] building #{ codegen_cli_path } " ,
169
170
"[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider"
170
171
] )
171
- assert_equal ( $collected_commands, [ "~/app/ios/../../../@ react-native/ codegen/scripts/oss/build.sh" ] )
172
+ assert_equal ( $collected_commands, [ "~/app/ios/../../../react-native- codegen/scripts/oss/build.sh" ] )
172
173
assert_equal ( FileMock . open_files [ 0 ] . collected_write , [ "[]" ] )
173
174
assert_equal ( FileMock . open_files [ 0 ] . fsync_invocation_count , 1 )
174
175
assert_equal ( Pod ::Executable . executed_commands [ 0 ] , {
@@ -185,7 +186,7 @@ def testCheckAndGenerateEmptyThirdPartyProvider_whenBothMissing_buildCodegen()
185
186
def testCheckAndGenerateEmptyThirdPartyProvider_withAbsoluteReactNativePath_buildCodegen ( )
186
187
# Arrange
187
188
rn_path = 'packages/react-native'
188
- codegen_cli_path = rn_path + "/../@ react-native/ codegen"
189
+ codegen_cli_path = rn_path + "/../react-native- codegen"
189
190
DirMock . mocked_existing_dirs ( [
190
191
@base_path + "/" + codegen_cli_path ,
191
192
] )
@@ -201,15 +202,16 @@ def testCheckAndGenerateEmptyThirdPartyProvider_withAbsoluteReactNativePath_buil
201
202
@base_path + "/" + rn_path + "/React/Fabric/" + @tmp_schema_list_file
202
203
] )
203
204
assert_equal ( DirMock . exist_invocation_params , [
204
- @base_path + "/" + rn_path + "/../react-native-codegen" ,
205
205
@base_path + "/" + codegen_cli_path ,
206
206
@base_path + "/" + codegen_cli_path + "/lib" ,
207
207
] )
208
208
assert_equal ( Pod ::UI . collected_messages , [
209
- "[Codegen] building #{ @base_path + "/" + codegen_cli_path } . " ,
209
+ "[Codegen] building #{ @base_path + "/" + codegen_cli_path } " ,
210
210
"[Codegen] generating an empty RCTThirdPartyFabricComponentsProvider"
211
211
] )
212
- assert_equal ( $collected_commands, [ @base_path + "/" + rn_path + "/../@react-native/codegen/scripts/oss/build.sh" ] )
212
+ assert_equal ( $collected_commands, [
213
+ @base_path + "/" + rn_path + "/../react-native-codegen/scripts/oss/build.sh" ,
214
+ ] )
213
215
assert_equal ( FileMock . open_files [ 0 ] . collected_write , [ "[]" ] )
214
216
assert_equal ( FileMock . open_files [ 0 ] . fsync_invocation_count , 1 )
215
217
assert_equal ( Pod ::Executable . executed_commands [ 0 ] , {
0 commit comments