Skip to content

Commit

Permalink
- introduce test case to verify release diff generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Feb 2, 2022
1 parent c8b0107 commit 29543ce
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions __tests__/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
)
})

0 comments on commit 29543ce

Please sign in to comment.