diff --git a/homeassistant-addon/CHANGELOG.md b/homeassistant-addon/CHANGELOG.md index 70d4baf..1acd307 100644 --- a/homeassistant-addon/CHANGELOG.md +++ b/homeassistant-addon/CHANGELOG.md @@ -19,7 +19,7 @@ If this add-on saves you time, you can [buy me a coffee](https://buymeacoffee.co - Internal: the 1.34.7 changelog heading is restored so release notes stop at the right version. - +## [1.34.8] - 2026-09-11 ### Fixed diff --git a/tests/extractChangelog.test.js b/tests/extractChangelog.test.js index 0c7b708..7fae315 100644 --- a/tests/extractChangelog.test.js +++ b/tests/extractChangelog.test.js @@ -48,7 +48,12 @@ describe('extractChangelogSection', () => { const current = require('../package.json').version; const headings = [...markdown.matchAll(/^## \[(\d+\.\d+\.\d+)\]/gm)].map((m) => m[1]); expect(headings[0]).toBe(current); - expect(headings[1]).toBeDefined(); + const parts = current.split('.').map(Number); + if (parts[2] > 0) { + expect(headings[1]).toBe(`${parts[0]}.${parts[1]}.${parts[2] - 1}`); + } else { + expect(headings[1]).toBeDefined(); + } const section = extractChangelogSection(markdown, current); expect(section).toContain(`## [${current}]`); expect(section).not.toContain(`## [${headings[1]}]`);