- introduce test case to verify release diff generation

This commit is contained in:
Mike Penz
2022-02-02 18:24:03 +01:00
parent c8b0107b59
commit 29543cec44
+19
View File
@@ -429,4 +429,23 @@ it('Commit SHA-1 in commitMode', async () => {
expect(resultChangelog).toStrictEqual(
`## 🚀 Features\n\nsha1-3\nsha1-1\n\n## 🐛 Fixes\n\nsha1-3\nsha1-2\n\n`
)
})
it('Release Diff', async () => {
const customConfig = Object.assign({}, DefaultConfiguration)
customConfig.template = "${{RELEASE_DIFF}}"
const resultChangelog = buildChangelog(pullRequestsWithLabels, {
owner: 'mikepenz',
repo: 'release-changelog-builder-action',
fromTag: 'v2.8.0',
toTag: 'v2.8.1',
failOnError: false,
commitMode: true,
configuration: customConfig
})
expect(resultChangelog).toStrictEqual(
`https://github.com/mikepenz/release-changelog-builder-action/compare/v2.8.0...v2.8.1`
)
})