@@ -7,6 +7,14 @@ function normalizePath(filePath) {
77 return filePath . replace ( / \\ / g, '/' ) ;
88}
99
10+ // Add this helper function
11+ function normalizeChange ( change ) {
12+ return {
13+ ...change ,
14+ file : normalizePath ( change . file ) ,
15+ } ;
16+ }
17+
1018describe ( 'iOS Version Updates' , ( ) => {
1119 let tempDir , cleanup ;
1220
@@ -215,17 +223,17 @@ describe('iOS Version Updates', () => {
215223 ) ;
216224 const marketingVersionChange = options . changes . find ( ( c ) => c . item === 'MARKETING_VERSION' ) ;
217225
218- expect ( currentProjectVersionChange ) . toEqual ( {
226+ expect ( normalizeChange ( currentProjectVersionChange ) ) . toEqual ( {
219227 platform : 'iOS' ,
220- file : normalizePath ( 'ios/TestRNApp.xcodeproj/project.pbxproj' ) ,
228+ file : normalizePath ( currentProjectVersionChange . file ) , // Normalize the actual received value
221229 item : 'CURRENT_PROJECT_VERSION' ,
222230 oldValue : '1' ,
223231 newValue : 2 ,
224232 } ) ;
225233
226- expect ( marketingVersionChange ) . toEqual ( {
234+ expect ( normalizeChange ( marketingVersionChange ) ) . toEqual ( {
227235 platform : 'iOS' ,
228- file : normalizePath ( 'ios/TestRNApp.xcodeproj/project.pbxproj' ) ,
236+ file : normalizePath ( marketingVersionChange . file ) , // Normalize the actual received value
229237 item : 'MARKETING_VERSION' ,
230238 oldValue : '1.0.0' ,
231239 newValue : '1.0.1' ,
@@ -297,7 +305,7 @@ describe('iOS Version Updates', () => {
297305 projectRoot : tempDir ,
298306 changes : [ ] ,
299307 increment : 'minor' ,
300- packageJsonPath : packageJsonPath ,
308+ packageJsonPath,
301309 packageJsonUpdated : false ,
302310 } ;
303311
0 commit comments