@@ -7,6 +7,14 @@ function normalizePath(filePath) {
7
7
return filePath . replace ( / \\ / g, '/' ) ;
8
8
}
9
9
10
+ // Add this helper function
11
+ function normalizeChange ( change ) {
12
+ return {
13
+ ...change ,
14
+ file : normalizePath ( change . file ) ,
15
+ } ;
16
+ }
17
+
10
18
describe ( 'iOS Version Updates' , ( ) => {
11
19
let tempDir , cleanup ;
12
20
@@ -215,17 +223,17 @@ describe('iOS Version Updates', () => {
215
223
) ;
216
224
const marketingVersionChange = options . changes . find ( ( c ) => c . item === 'MARKETING_VERSION' ) ;
217
225
218
- expect ( currentProjectVersionChange ) . toEqual ( {
226
+ expect ( normalizeChange ( currentProjectVersionChange ) ) . toEqual ( {
219
227
platform : 'iOS' ,
220
- file : normalizePath ( 'ios/TestRNApp.xcodeproj/project.pbxproj' ) ,
228
+ file : normalizePath ( currentProjectVersionChange . file ) , // Normalize the actual received value
221
229
item : 'CURRENT_PROJECT_VERSION' ,
222
230
oldValue : '1' ,
223
231
newValue : 2 ,
224
232
} ) ;
225
233
226
- expect ( marketingVersionChange ) . toEqual ( {
234
+ expect ( normalizeChange ( marketingVersionChange ) ) . toEqual ( {
227
235
platform : 'iOS' ,
228
- file : normalizePath ( 'ios/TestRNApp.xcodeproj/project.pbxproj' ) ,
236
+ file : normalizePath ( marketingVersionChange . file ) , // Normalize the actual received value
229
237
item : 'MARKETING_VERSION' ,
230
238
oldValue : '1.0.0' ,
231
239
newValue : '1.0.1' ,
@@ -297,7 +305,7 @@ describe('iOS Version Updates', () => {
297
305
projectRoot : tempDir ,
298
306
changes : [ ] ,
299
307
increment : 'minor' ,
300
- packageJsonPath : packageJsonPath ,
308
+ packageJsonPath,
301
309
packageJsonUpdated : false ,
302
310
} ;
303
311
0 commit comments