@@ -298,9 +298,11 @@ describe("gateway version normalization", () => {
298298
299299describe ( "release note extraction" , ( ) => {
300300 it ( "requires exact App Store version notes and adds the gateway association" , ( ) => {
301- const rootDir = writeIosFixture ( {
302- packageVersion : "2026.7.2" ,
303- changelog : `# OpenClaw iOS Changelog
301+ const version = resolveIosVersion ( "." , {
302+ appStoreRevision : 1 ,
303+ releaseVersion : "2026.7.2" ,
304+ } ) ;
305+ const changelog = `# OpenClaw iOS Changelog
304306
305307## Unreleased
306308
@@ -309,39 +311,28 @@ Draft notes.
309311## 2026.7.21
310312
311313- App Store revision notes.
312- ` ,
313- } ) ;
314- const version = resolveIosVersion ( rootDir , {
315- appStoreRevision : 1 ,
316- releaseVersion : "2026.7.2" ,
317- } ) ;
318- const changelog = fs . readFileSync ( path . join ( rootDir , "apps" , "ios" , "CHANGELOG.md" ) , "utf8" ) ;
314+ ` ;
319315
320316 expect ( renderIosReleaseNotes ( version , changelog ) ) . toBe (
321317 "Gateway version: 2026.7.2\n\n- App Store revision notes.\n" ,
322318 ) ;
323319 } ) ;
324320
325321 it ( "does not fall back to gateway or Unreleased notes for App Store revisions" , ( ) => {
326- const rootDir = writeIosFixture ( {
327- packageVersion : "2026.7.2" ,
328- changelog : "# OpenClaw iOS Changelog\n\n## Unreleased\n\nDraft notes.\n" ,
329- } ) ;
330- const version = resolveIosVersion ( rootDir , {
322+ const version = resolveIosVersion ( "." , {
331323 appStoreRevision : 1 ,
332324 releaseVersion : "2026.7.2" ,
333325 } ) ;
334- const changelog = fs . readFileSync ( path . join ( rootDir , "apps" , "ios" , "CHANGELOG.md" ) , "utf8" ) ;
326+ const changelog = "# OpenClaw iOS Changelog\n\n## Unreleased\n\nDraft notes.\n" ;
335327
336328 expect ( ( ) => renderIosReleaseNotes ( version , changelog ) ) . toThrow (
337329 "Unable to find iOS changelog notes for 2026.7.21" ,
338330 ) ;
339331 } ) ;
340332
341333 it ( "extracts exact pinned version sections first" , ( ) => {
342- const rootDir = writeIosFixture ( {
343- packageVersion : "2026.4.6" ,
344- changelog : `# OpenClaw iOS Changelog
334+ const version = resolveIosVersion ( "." , { releaseVersion : "2026.4.6" } ) ;
335+ const changelog = `# OpenClaw iOS Changelog
345336
346337## Unreleased
347338
@@ -350,31 +341,25 @@ Draft notes.
350341## 2026.4.6
351342
352343- Exact release notes.
353- ` ,
354- } ) ;
355- const version = resolveIosVersion ( rootDir ) ;
356- const changelog = fs . readFileSync ( path . join ( rootDir , "apps" , "ios" , "CHANGELOG.md" ) , "utf8" ) ;
344+ ` ;
357345
358346 expect ( renderIosReleaseNotes ( version , changelog ) ) . toBe ( "- Exact release notes.\n" ) ;
359347 } ) ;
360348
361349 it ( "falls back to Unreleased when the release section does not exist yet" , ( ) => {
362- const rootDir = writeIosFixture ( {
363- packageVersion : "2026.4.6" ,
364- changelog : `# OpenClaw iOS Changelog
350+ const version = resolveIosVersion ( "." , { releaseVersion : "2026.4.6" } ) ;
351+ const changelog = `# OpenClaw iOS Changelog
365352
366353## Unreleased
367354
368355### Added
369356
370357- New iOS feature.
371- ` ,
372- } ) ;
373- const version = resolveIosVersion ( rootDir ) ;
374- const changelog = fs . readFileSync ( path . join ( rootDir , "apps" , "ios" , "CHANGELOG.md" ) , "utf8" ) ;
358+ ` ;
359+ const notes = renderIosReleaseNotes ( version , changelog ) ;
375360
376- expect ( renderIosReleaseNotes ( version , changelog ) ) . toContain ( "### Added" ) ;
377- expect ( renderIosReleaseNotes ( version , changelog ) ) . toContain ( "- New iOS feature." ) ;
361+ expect ( notes ) . toContain ( "### Added" ) ;
362+ expect ( notes ) . toContain ( "- New iOS feature." ) ;
378363 } ) ;
379364
380365 it ( "extracts markdown bodies without the version heading" , ( ) => {
0 commit comments